Package thredds.servlet.restrict
Class AuthorizerNoop
- java.lang.Object
-
- thredds.servlet.restrict.AuthorizerNoop
-
- All Implemented Interfaces:
Authorizer
public class AuthorizerNoop extends Object implements Authorizer
No-op implementation of Authorizer. Always returns authorize=true.- Since:
- Dec 28, 2009
-
-
Constructor Summary
Constructors Constructor Description AuthorizerNoop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthorize(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String role)Decide is this request is authorized in the named role.voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)Process this request.voidsetRoleSource(RoleSource roleSource)Set the role source, if there is one.
-
-
-
Method Detail
-
setRoleSource
public void setRoleSource(RoleSource roleSource)
Description copied from interface:AuthorizerSet the role source, if there is one. If not, assume no role authentication is needed. use RoleSource.hasRole() to test for role.- Specified by:
setRoleSourcein interfaceAuthorizer- Parameters:
roleSource- tells whether a user has the named role.
-
authorize
public boolean authorize(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String role) throws IOException, javax.servlet.ServletExceptionDescription copied from interface:AuthorizerDecide is this request is authorized in the named role. This method must be thread-safe.- Specified by:
authorizein interfaceAuthorizer- Parameters:
req- the requestres- the responserole- need this role- Returns:
- true if user is authenticated. if false, must set res.setStatus().
- Throws:
IOException- I/O error, eg networkjavax.servlet.ServletException- other errors
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOExceptionDescription copied from interface:AuthorizerProcess this request. May be a no-op.- Specified by:
doGetin interfaceAuthorizer- Parameters:
req- the requestres- the response- Throws:
javax.servlet.ServletException- other errorsIOException- I/O error, eg network
-
-