Class AbstractSecurityContext
java.lang.Object
com.sun.enterprise.security.common.AbstractSecurityContext
- All Implemented Interfaces:
com.sun.enterprise.security.integration.AppServSecurityContext
,Serializable
- Direct Known Subclasses:
ClientSecurityContext
,SecurityContext
public abstract class AbstractSecurityContext
extends Object
implements com.sun.enterprise.security.integration.AppServSecurityContext, Serializable
This base class defines the methods that Security Context should exhibit. There are two places where a derived class
are used. They are on the appclient side and ejb side. The derived classes can use thread local storage to store the
security contexts.
- Author:
- Harpreet Singh
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sun.enterprise.security.integration.AppServSecurityContext
getCurrentSecurityContext, newInstance, newInstance, setCurrentSecurityContext, setSecurityContextWithPrincipal, setUnauthenticatedSecurityContext
-
Field Details
-
initiator
The principal that this security context represents -
subject
-
-
Constructor Details
-
AbstractSecurityContext
public AbstractSecurityContext()
-
-
Method Details
-
getCallerPrincipal
This method should be implemented by the subclasses to return the caller principal. This information may be redundant since the same information can be inferred by inspecting the Credentials of the caller.- Specified by:
getCallerPrincipal
in interfacecom.sun.enterprise.security.integration.AppServSecurityContext
- Returns:
- The caller Principal.
-
getSubject
This method should be implemented by the subclasses to return the Credentials of the caller principal.- Specified by:
getSubject
in interfacecom.sun.enterprise.security.integration.AppServSecurityContext
- Returns:
- A credentials object associated with the current client invocation.
-