public abstract class AbstractAuthorizer extends Object implements Authorizer
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 |
handleAuthorization(Context context,
UserProfile userProfile)
Unless overridden, all authenticated requests will be considered authorized.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isAuthenticationRequired
public void handleAuthorization(Context context, UserProfile userProfile) throws Exception
handleAuthorization
in interface Authorizer
context
- The context to handleuserProfile
- The authenticated user profileException
- if anything goes wrong (exception will be implicitly passed to the context's Context.error(Throwable)
method)Authorizer.isAuthenticationRequired(ratpack.handling.Context)