Class 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:
    Serialized Form
    • Constructor Detail

      • AbstractSecurityContext

        public AbstractSecurityContext()
    • 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 interface com.sun.enterprise.security.integration.AppServSecurityContext
        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 interface com.sun.enterprise.security.integration.AppServSecurityContext
        Returns:
        A credentials object associated with the current client invocation.