Package com.netscape.certsrv.base
Class SessionContext
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- com.netscape.certsrv.base.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.StringAUTH_MANAGER_IDID of the authentication manager in the current thread.static java.lang.StringAUTH_TOKENAuthentication token in the current thread.static java.lang.StringCMC_ISSUER_PRINCIPALstatic java.lang.StringCMC_REQUEST_CERT_SUBJECTstatic java.lang.StringCMC_SIGNER_INFOstatic java.lang.StringCMC_SIGNER_PRINCIPALPrincipal name object of the signed CMC requeststatic java.lang.StringGROUP_IDGroup ID of the authenticated user in the current thread.static java.lang.StringIPADDRESSIP Address of the requestor of the request in the current thread.static java.lang.StringLOCALEEnd user locale of the current processing request in the current thread.static java.lang.StringRECOVERY_IDRecovery ID of a recovery operation in KRA in the current thread.static java.lang.StringREQUESTER_IDID of the processing request in the current thread.static java.lang.StringSSL_CLIENT_CERTauthenticated SSL client certificatestatic java.lang.StringUSERUser object of the authenticated user in the current thread.static java.lang.StringUSER_IDUser 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 SessionContextgetContext()Retrieves the session context associated with the current thread.static SessionContextgetExistingContext()Retrieves the session context associated with the current thread.static voidreleaseContext()Releases the current session context.static voidsetContext(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
-
-
-
-
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_SIGNER_INFO
public static final java.lang.String CMC_SIGNER_INFO
- 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
-
-
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.
-
-