Class SessionContext

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,​java.lang.Object>

    public class SessionContext
    extends java.util.Hashtable<java.lang.Object,​java.lang.Object>
    This class specifies the context object that includes authentication environment and connection information. This object is later used in access control evaluation. This is a global object that can be accessible throughout the server. It is useful for passing global and per-thread infomration in methods.

    Version:
    $Revision$, $Date$
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String AUTH_MANAGER_ID
      ID of the authentication manager in the current thread.
      static java.lang.String AUTH_TOKEN
      Authentication token in the current thread.
      static java.lang.String CMC_ISSUER_PRINCIPAL  
      static java.lang.String CMC_REQUEST_CERT_SUBJECT  
      static java.lang.String CMC_SIGNER_INFO  
      static java.lang.String CMC_SIGNER_PRINCIPAL
      Principal name object of the signed CMC request
      static java.lang.String GROUP_ID
      Group ID of the authenticated user in the current thread.
      static java.lang.String IPADDRESS
      IP Address of the requestor of the request in the current thread.
      static java.lang.String LOCALE
      End user locale of the current processing request in the current thread.
      static java.lang.String RECOVERY_ID
      Recovery ID of a recovery operation in KRA in the current thread.
      static java.lang.String REQUESTER_ID
      ID of the processing request in the current thread.
      static java.lang.String SSL_CLIENT_CERT
      authenticated SSL client certificate
      static java.lang.String USER
      User object of the authenticated user in the current thread.
      static java.lang.String USER_ID
      User ID of the authenticated user in the current thread.
    • Constructor Summary

      Constructors 
      Constructor Description
      SessionContext()
      Constructs a session context.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SessionContext getContext()
      Retrieves the session context associated with the current thread.
      static SessionContext getExistingContext()
      Retrieves the session context associated with the current thread.
      static void releaseContext()
      Releases the current session context.
      static void setContext​(SessionContext sc)
      Sets the current context.
      • Methods inherited from class java.util.Hashtable

        clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • LOCALE

        public static final java.lang.String LOCALE
        End user locale of the current processing request in the current thread.
        See Also:
        Constant Field Values
      • AUTH_TOKEN

        public static final java.lang.String AUTH_TOKEN
        Authentication token in the current thread.
        See Also:
        Constant Field Values
      • AUTH_MANAGER_ID

        public static final java.lang.String AUTH_MANAGER_ID
        ID of the authentication manager in the current thread.
        See Also:
        Constant Field Values
      • CMC_SIGNER_PRINCIPAL

        public static final java.lang.String CMC_SIGNER_PRINCIPAL
        Principal name object of the signed CMC request
        See Also:
        Constant Field Values
      • CMC_ISSUER_PRINCIPAL

        public static final java.lang.String CMC_ISSUER_PRINCIPAL
        See Also:
        Constant Field Values
      • CMC_REQUEST_CERT_SUBJECT

        public static final java.lang.String CMC_REQUEST_CERT_SUBJECT
        See Also:
        Constant Field Values
      • SSL_CLIENT_CERT

        public static final java.lang.String SSL_CLIENT_CERT
        authenticated SSL client certificate
        See Also:
        Constant Field Values
      • USER

        public static final java.lang.String USER
        User object of the authenticated user in the current thread.
        See Also:
        Constant Field Values
      • USER_ID

        public static final java.lang.String USER_ID
        User ID of the authenticated user in the current thread.
        See Also:
        Constant Field Values
      • GROUP_ID

        public static final java.lang.String GROUP_ID
        Group ID of the authenticated user in the current thread.
        See Also:
        Constant Field Values
      • REQUESTER_ID

        public static final java.lang.String REQUESTER_ID
        ID of the processing request in the current thread.
        See Also:
        Constant Field Values
      • RECOVERY_ID

        public static final java.lang.String RECOVERY_ID
        Recovery ID of a recovery operation in KRA in the current thread.
        See Also:
        Constant Field Values
      • IPADDRESS

        public static final java.lang.String IPADDRESS
        IP Address of the requestor of the request in the current thread.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SessionContext

        public SessionContext()
        Constructs a session context.
    • Method Detail

      • setContext

        public static void setContext​(SessionContext sc)
        Sets the current context. This allows the caller to associate a specific session context with the current thread. This methods makes custom session context possible.
        Parameters:
        sc - session context
      • getContext

        public static SessionContext getContext()
        Retrieves the session context associated with the current thread. If no context is associated, a context is created.
        Returns:
        sesssion context
      • getExistingContext

        public static SessionContext getExistingContext()
        Retrieves the session context associated with the current thread. If no context is associated, null is returned.
        Returns:
        sesssion context
      • releaseContext

        public static void releaseContext()
        Releases the current session context.