|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.core.Wrapper | +--org.objectweb.jac.aspects.authentication.AuthenticationWrapper
This wrapper uses an authenticator and a controller to ensure that the current interaction is authenticated and allowed.
AuthenticationAC
,
Authenticator
,
Serialized FormField Summary |
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac |
Constructor Summary | |
AuthenticationWrapper(AspectComponent ac,
Authenticator authenticator,
MethodItem controller)
Constructs a new authentication wrapper. |
Method Summary | |
Object |
authenticateAndControl(Interaction interaction)
This wrapping method authenticates a call on the wrapped method and controls that the authentcated user owns the rights to call it. |
void |
catchAccessDenied(AccessDeniedException e)
This exception handler reacts when the access is denied. |
static boolean |
dummyController(String username,
Object wrappee,
MethodItem method)
Always return true. |
boolean |
isTrustedUser(String username)
Returns true if the user is in the trusted users list. |
void |
setAccessDeniedMessage(String message)
Sets the message to show when the access is denied. |
void |
setAuthenticator(Authenticator authenticator)
|
void |
setController(MethodItem controller)
Sets the access rights controller. |
Methods inherited from class org.objectweb.jac.core.Wrapper |
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AuthenticationWrapper(AspectComponent ac, Authenticator authenticator, MethodItem controller)
ac
- the aspect component that owns this wrappercontroller
- the method that grants the rights or notMethod Detail |
public void setController(MethodItem controller)
controller
- a static method of the prototype boolean
controller(String username,Object wrappee,MethodItem method)
UserAC.userController(String,Object,MethodItem)
,
dummyController(String,Object,MethodItem)
public void setAuthenticator(Authenticator authenticator)
public Object authenticateAndControl(Interaction interaction) throws AuthenticationFailedException, AccessDeniedException, Throwable
AuthenticationFailedException
AccessDeniedException
Throwable
public boolean isTrustedUser(String username)
username
- the name of the user to check
public void setAccessDeniedMessage(String message)
message
- the messagepublic void catchAccessDenied(AccessDeniedException e)
e
- the acces denied exceptionpublic static boolean dummyController(String username, Object wrappee, MethodItem method)
username
- the user's namewrappee
- the authenticated methodmethod
- the authenticated method
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |