U - The UserProfile typepublic abstract class AbstractAuthorizer<U extends UserProfile> extends Object implements Authorizer<U>
Authorizer that provides sensible defaults.
Unless overridden, all authenticated requests will be considered authorized and authentication failures will be handled with the default client error handling for status 403 Forbidden.
| Constructor and Description |
|---|
AbstractAuthorizer() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleAuthenticationFailure(Context context)
Unless overridden, all authentication failures will be handled with the default client error handling for status
403 Forbidden. |
void |
handleAuthorization(Context context,
U userProfile)
Unless overridden, all authenticated requests will be considered authorized.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisAuthenticationRequiredpublic void handleAuthorization(Context context, U userProfile) throws Exception
handleAuthorization in interface Authorizer<U extends UserProfile>context - The context to handleuserProfile - The authenticated user profileException - if anything goes wrong (exception will be implicitly passed to the context's Context.error(Exception) method)Authorizer.isAuthenticationRequired(ratpack.handling.Context)public void handleAuthenticationFailure(Context context)
403 Forbidden.handleAuthenticationFailure in interface Authorizer<U extends UserProfile>context - The context to handle