public abstract class AuthorizationInterceptor
extends java.lang.Object
implements jodd.madvoc.interceptor.ActionInterceptor
AuthenticationInterceptor.
Authorization pertains to the question "What may you do?". In JEE applications, this is achieved by making secured resources accessible ("requestable" in web applications) to particular "roles". Principals (i.e. users) who are associated with one or more of these roles will have access to those resources.
| Constructor and Description |
|---|
AuthorizationInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
authorize(jodd.madvoc.ActionRequest request,
java.lang.Object userSession)
Performs authorization of a request.
|
java.lang.Object |
intercept(jodd.madvoc.ActionRequest actionRequest) |
protected java.lang.Object |
resultAccessDenied()
Prepares result for access denied page.
|
protected java.lang.Object |
resultLogin(java.lang.String targetUrl)
Prepares result for login page, when access to target URL is forbidden.
|
public java.lang.Object intercept(jodd.madvoc.ActionRequest actionRequest)
throws java.lang.Exception
intercept in interface jodd.madvoc.interceptor.ActionInterceptorjava.lang.Exceptionprotected java.lang.Object resultAccessDenied()
protected java.lang.Object resultLogin(java.lang.String targetUrl)
null.protected abstract boolean authorize(jodd.madvoc.ActionRequest request,
java.lang.Object userSession)
For user that is not authenticated, userSession is null.
Authenticated users will have their user session set.
Copyright © 2003-present Jodd Team