public class MethodAuthorizer extends Authorizer
ALWAYS, AUTHENTICATED, NEVER| Constructor and Description |
|---|
MethodAuthorizer()
Default constructor.
|
MethodAuthorizer(java.lang.String identifier)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
authorize(Request request,
Response response)
Authorizes the request only if its method is one of the authorized
methods.
|
java.util.List<Method> |
getAnonymousMethods()
Returns the modifiable list of methods authorized for anonymous users.
|
java.util.List<Method> |
getAuthenticatedMethods()
Returns the modifiable list of methods authorized for authenticated
users.
|
void |
setAnonymousMethods(java.util.List<Method> anonymousMethods)
Sets the modifiable list of methods authorized for anonymous users.
|
void |
setAuthenticatedMethods(java.util.List<Method> authenticatedMethods)
Sets the modifiable list of methods authorized for authenticated users.
|
authorized, beforeHandle, getIdentifier, setIdentifier, unauthorizedafterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stopcreateFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwnerpublic MethodAuthorizer()
public MethodAuthorizer(java.lang.String identifier)
identifier - The identifier unique within an application.public boolean authorize(Request request, Response response)
authorize in class Authorizerrequest - The request sent.response - The response to update.public java.util.List<Method> getAnonymousMethods()
public java.util.List<Method> getAuthenticatedMethods()
public void setAnonymousMethods(java.util.List<Method> anonymousMethods)
anonymousMethods - A list of methods authorized for anonymous users.public void setAuthenticatedMethods(java.util.List<Method> authenticatedMethods)
authenticatedMethods - A list of methods authorized for authenticated users.Copyright © 2005-2024 Restlet.