Class AbstractSecurityContext
- java.lang.Object
-
- com.sun.enterprise.security.common.AbstractSecurityContext
-
- All Implemented Interfaces:
AppServSecurityContext
,Serializable
- Direct Known Subclasses:
ClientSecurityContext
,SecurityContext
public abstract class AbstractSecurityContext extends Object implements 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Principal
additionalPrincipal
protected Principal
callerPrincipal
protected Subject
subject
-
Constructor Summary
Constructors Constructor Description AbstractSecurityContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Principal
getAdditionalPrincipal()
abstract Principal
getCallerPrincipal()
This method should be implemented by the subclasses to return the caller principal.abstract Subject
getSubject()
This method should be implemented by the subclasses to return the Credentials of the caller principal.void
setAdditionalPrincipal(Principal principal)
-
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
-
-
-
-
Method Detail
-
getCallerPrincipal
public abstract Principal 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 interfaceAppServSecurityContext
- Returns:
- The caller Principal.
-
getSubject
public abstract Subject getSubject()
This method should be implemented by the subclasses to return the Credentials of the caller principal.- Specified by:
getSubject
in interfaceAppServSecurityContext
- Returns:
- A credentials object associated with the current client invocation.
-
getAdditionalPrincipal
public Principal getAdditionalPrincipal()
-
setAdditionalPrincipal
public void setAdditionalPrincipal(Principal principal)
-
-