|
JBoss Security SPI - Aggregator 2.0.4.SP8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.SecurityContextUtil
public abstract class SecurityContextUtil
General Utility methods for dealing with the SecurityContext
Field Summary | |
---|---|
protected SecurityContext |
securityContext
|
Constructor Summary | |
---|---|
SecurityContextUtil()
|
Method Summary | ||
---|---|---|
void |
addIdentity(Identity id)
Add an Identity to the Security Context |
|
void |
clearIdentities(Class<?> clazz)
Clear Identities of a particular type |
|
void |
createSubjectInfo(Identity identity,
Subject theSubject)
Create a SubjectInfo |
|
void |
createSubjectInfo(Principal principal,
Object credential,
Subject subject)
Create SubjectInfo and set it in the current security context |
|
abstract
|
get(String key)
Return an object from the Security Context |
|
abstract Object |
getCredential()
Get the credential |
|
Set<Identity> |
getIdentities(Class<?> clazz)
Get a set of identities of a particular type |
|
abstract RoleGroup |
getRoles()
Get the Roles associated with the user for the current security context |
|
abstract SecurityIdentity |
getSecurityIdentity()
Get a holder of subject, runAs and caller RunAs |
|
abstract Subject |
getSubject()
Get the subject the security context |
|
abstract String |
getUserName()
Get the username from the security context |
|
abstract Principal |
getUserPrincipal()
Get the user principal the security context |
|
abstract
|
remove(String key)
Remove an object represented by the key from the security context |
|
abstract
|
set(String key,
T obj)
Set an object on the Security Context The context implementation may place the object in its internal data structures (like the Data Map) |
|
void |
setIdentities(Set<Identity> idSet)
Set the Identities into the Security Context |
|
abstract void |
setRoles(RoleGroup roles)
Set the roles for the user for the current security context |
|
void |
setSecurityContext(SecurityContext sc)
|
|
abstract void |
setSecurityIdentity(SecurityIdentity si)
Inject subject, runAs and callerRunAs into the security context Mainly used by integration code base to cache the security identity and put back to the security context |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SecurityContext securityContext
Constructor Detail |
---|
public SecurityContextUtil()
Method Detail |
---|
public void setSecurityContext(SecurityContext sc)
public abstract String getUserName()
public abstract Principal getUserPrincipal()
public abstract Object getCredential()
public abstract Subject getSubject()
public abstract SecurityIdentity getSecurityIdentity()
public abstract void setSecurityIdentity(SecurityIdentity si)
si
- The SecurityIdentity Objectpublic abstract RoleGroup getRoles()
T
-
public abstract void setRoles(RoleGroup roles)
T
- roles
- public void createSubjectInfo(Principal principal, Object credential, Subject subject)
principal
- credential
- subject
- public void createSubjectInfo(Identity identity, Subject theSubject)
identity
- theSubject
- The AuthenticatedSubject(can be null)public void addIdentity(Identity id)
id
- public void clearIdentities(Class<?> clazz)
clazz
- public Set<Identity> getIdentities(Class<?> clazz)
clazz
-
public void setIdentities(Set<Identity> idSet)
idSet
- public abstract <T> void set(String key, T obj)
T
- Generic Typesc
- Security Context Objectkey
- Key representing the object being setobj
- public abstract <T> T get(String key)
T
- sc
- Security Context Objectkey
- key identifies the type of object we are requesting
public abstract <T> T remove(String key)
T
- sc
- Security Context Objectkey
- key identifies the type of object we are requesting
|
JBoss Security SPI - Aggregator 2.0.4.SP8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |