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

    Fields
    Modifier and Type
    Field
    Description
    protected Principal
    The principal that this security context represents
    protected Subject
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Principal
    This method should be implemented by the subclasses to return the caller principal.
    abstract Subject
    This method should be implemented by the subclasses to return the Credentials of the caller 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
  • Field Details

    • initiator

      protected Principal initiator
      The principal that this security context represents
    • subject

      protected Subject subject
  • Constructor Details

    • AbstractSecurityContext

      public AbstractSecurityContext()
  • Method Details

    • 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.