|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.soa.esb.services.security.SecurityContext
public final class SecurityContext
Security Context contains security related information.
Note that even though a Subject object instance is serialiable, its private and public credentials are not(they are transient).Also not that the Principal interface is not serializable but all implemenations should be.
When created a SecurityContext will be given a timeout argument which is the time in milliseconds after which the context is considered invalid.
Constructor Summary | |
---|---|
SecurityContext()
Creates a SecurityContext with a default Subject. |
|
SecurityContext(javax.security.auth.Subject subject)
Creates a SecurityContext associating the passed in Subject with it. |
|
SecurityContext(javax.security.auth.Subject subject,
long timeout)
Creates a SecurityContext associating the passed in Subject with it. |
Method Summary | |
---|---|
boolean |
compareTo(AuthenticationRequest authrequest)
Will check if the passed in AuthenticationRequest contains the
same security information (Principal and credentials) as the this context. |
static SecurityContext |
decryptContext(javax.crypto.SealedObject sealedObject)
|
static javax.crypto.SealedObject |
encryptContext(SecurityContext context)
|
static long |
getConfigurationTimeout()
Get the globally configured security context timeout. |
static javax.crypto.SealedObject |
getSecurityContext()
|
javax.security.auth.Subject |
getSubject()
|
long |
getTimeOfCreation()
|
long |
getTimeout()
Timeout if milliseconds. |
boolean |
isCallerInRole(java.lang.String roleName)
|
boolean |
isValid()
|
static void |
setSecurityContext(javax.crypto.SealedObject sealedObject)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SecurityContext()
public SecurityContext(javax.security.auth.Subject subject)
subject
- The Subject that is to be associated with this security context.public SecurityContext(javax.security.auth.Subject subject, long timeout)
subject
- The Subject that is to be associated with this security context.timeout
- A timeout which specifies how long this Security Context is valid for. Must be a positiv value.Method Detail |
---|
public boolean isCallerInRole(java.lang.String roleName)
public boolean compareTo(AuthenticationRequest authrequest)
AuthenticationRequest
contains the
same security information (Principal and credentials) as the this context.
authrequest
- - the authentication request to compare
public long getTimeOfCreation()
public long getTimeout()
public boolean isValid()
public javax.security.auth.Subject getSubject()
public java.lang.String toString()
toString
in class java.lang.Object
public static SecurityContext decryptContext(javax.crypto.SealedObject sealedObject) throws SecurityServiceException
SecurityServiceException
public static javax.crypto.SealedObject encryptContext(SecurityContext context) throws SecurityServiceException
SecurityServiceException
public static long getConfigurationTimeout() throws SecurityServiceException
SecurityServiceException
public static void setSecurityContext(javax.crypto.SealedObject sealedObject)
public static javax.crypto.SealedObject getSecurityContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |