|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.granite.messaging.service.security.AbstractSecurityService
public abstract class AbstractSecurityService
Abstract implementation of the SecurityService interface. This class mainly contains
utility methods helping with actual implementations.
| Field Summary | |
|---|---|
static String |
AUTH_TYPE
|
| Constructor Summary | |
|---|---|
AbstractSecurityService()
|
|
| Method Summary | |
|---|---|
protected String[] |
decodeBase64Credentials(Object credentials)
Decode credentails encoded in base 64 (in the form of "username:password"), as they have been sent by a RemoteObject. |
protected Object |
endAuthorization(AbstractSecurityContext context)
Invoke a service method (EJB3, Spring, Seam, etc...) after a successful authorization. |
protected void |
endLogin(Object credentials)
Try to save current credentials in distributed data, typically a user session attribute. |
protected void |
endLogout()
Try to remove credentials previously saved in distributed data. |
void |
handleSecurityException(SecurityServiceException e)
Handle a security exception. |
protected void |
startAuthorization(AbstractSecurityContext context)
Try to login by using remote credentials (see Flex method RemoteObject.setRemoteCredentials()). |
protected boolean |
tryRelogin()
Try to re-authenticate the current user with credentials previously saved in distributed data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.granite.messaging.service.security.SecurityService |
|---|
authorize, configure, login, logout |
| Field Detail |
|---|
public static final String AUTH_TYPE
| Constructor Detail |
|---|
public AbstractSecurityService()
| Method Detail |
|---|
protected void startAuthorization(AbstractSecurityContext context)
throws SecurityServiceException
SecurityService.authorize(AbstractSecurityContext).
context - the current security context.
SecurityServiceException - if login fails.
protected Object endAuthorization(AbstractSecurityContext context)
throws Exception
SecurityService.authorize(AbstractSecurityContext).
context - the current security context.
Exception - if anything goes wrong with service invocation.protected String[] decodeBase64Credentials(Object credentials)
credentials - base 64 encoded credentials.
IllegalArgumentException - if credentials isn't a String.
SecurityServiceException - if credentials are invalid (bad encoding or missing ':').public void handleSecurityException(SecurityServiceException e)
AMF3MessageProcessor.processCommandMessage(flex.messaging.messages.CommandMessage)
whenever a SecurityService occurs and does nothing by default.
handleSecurityException in interface SecurityServicee - the security exception.protected void endLogin(Object credentials)
SecurityService.login(Object) operation and is useful
in clustered environments with session replication in order to transparently re-authenticate the
user when failing over.
credentials - the credentials to be saved in distributed data.protected boolean tryRelogin()
SecurityService.authorize(AbstractSecurityContext)
method when the current user principal is null.
endLogin(Object)protected void endLogout()
SecurityService.logout() method.
endLogin(Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||