Class AuthToken
java.lang.Object
org.dogtagpki.server.authentication.AuthToken
- Direct Known Subclasses:
ExternalAuthToken
Authentication token returned by Authentication Managers.
Upon return, it contains authentication/identification information
as well as information retrieved from the database where the
authentication was done against. Each authentication manager has
its own list of such information. See individual authenticaiton
manager for more details.
- Version:
- $Revision$, $Date$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
Name of the authentication manager that created the AuthToken as a string.static final String
Time of authentication as a java.util.Datestatic final String
Certificate to be renewedstatic final String
static final String
static final String
static final String
static final String
static final String
Certificate to be revokedstatic final String
static final String
static final String
Constant for userid.static final String
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionAuthToken
(AuthManager authMgr) Constructs an instance of a authentication token. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes an attribute in the AuthTokenGets an attribute value.Gets the name of the authentication manager instance that created this token.Gets the time of authentication.Enumerate all attribute names in the AuthToken.getInBigIntegerArray
(String name) Retrieves the BigInteger array value for name.byte[]
getInByteArray
(String name) Retrieves the byte array value for name.byte[][]
getInByteArrayArray
(String name) Retrieves the byte[][] value for name.org.mozilla.jss.netscape.security.x509.X509CertImpl
Retrieves the X509CertImpl value for name.org.mozilla.jss.netscape.security.x509.CertificateExtensions
getInCertExts
(String name) Retrieves the CertificateExtensions value for name.getInCertificates
(String name) Retrieves the Certificates value for name.Retrieves the Date value for name.getInInteger
(String name) Retrieves the Integer value for name.getInString
(String attrName) Gets an attribute value.String[]
getInStringArray
(String name) Retrieves the String array value for name.getVals()
Enumerate all attribute values in the AuthToken.boolean
Stores the byte array with the associated key.boolean
Stores the byte[][] with the associated key.boolean
set
(String name, Certificates value) Stores the Certificates with the associated key.boolean
Stores the Integer with the associated key.boolean
Sets an attribute value within this AttrSet.boolean
Stores the String array with the associated key.boolean
set
(String name, BigInteger[] value) Stores the BigInteger array with the associated key.boolean
Stores the Date with the associated key.boolean
Stores the CertificateExtensions with the associated key.boolean
Stores the X509CertImpl with the associated key.
-
Field Details
-
USER
Constant for userid.- See Also:
-
USER_DN
- See Also:
-
USER_ID
- See Also:
-
UID
- See Also:
-
GROUP
- See Also:
-
GROUPS
- See Also:
-
TOKEN_CERT_SUBJECT
- See Also:
-
TOKEN_AUTHENTICATED_CERT_SUBJECT
- See Also:
-
TOKEN_SHARED_TOKEN_AUTHENTICATED_CERT_SUBJECT
- See Also:
-
TOKEN_CERT_NOTBEFORE
- See Also:
-
TOKEN_CERT_NOTAFTER
- See Also:
-
TOKEN_CERT_EXTENSIONS
- See Also:
-
TOKEN_CERT_SERIALNUM
- See Also:
-
TOKEN_CERT
Certificate to be renewed- See Also:
-
TOKEN_CERT_TO_REVOKE
Certificate to be revoked- See Also:
-
TOKEN_AUTHMGR_INST_NAME
Name of the authentication manager that created the AuthToken as a string.- See Also:
-
TOKEN_AUTHTIME
Time of authentication as a java.util.Date- See Also:
-
mAttrs
-
-
Constructor Details
-
AuthToken
public AuthToken() -
AuthToken
Constructs an instance of a authentication token. The token by default contains the following attributes:
"authMgrInstName" - The authentication manager instance name. "authTime" - The - The time of authentication.
- Parameters:
authMgr
- The authentication manager that created this Token.
-
-
Method Details
-
get
Gets an attribute value.- Parameters:
attrName
- the name of the attribute to return.- Returns:
- the attribute value
- Throws:
EBaseException
- on attribute handling errors.
-
getInString
Gets an attribute value.- Parameters:
attrName
- the name of the attribute to return.- Returns:
- the attribute value
- Throws:
EBaseException
- on attribute handling errors.
-
set
Sets an attribute value within this AttrSet.- Parameters:
attrName
- the name of the attributevalue
- the attribute object.- Returns:
- false on an error
-
delete
Removes an attribute in the AuthToken- Parameters:
attrName
- The name of the attribute to remove.
-
getElements
Enumerate all attribute names in the AuthToken.- Returns:
- Enumeration of all attribute names in this AuthToken.
-
getInByteArray
Retrieves the byte array value for name. The value should have been previously stored as a byte array (it will be CMS.AtoB decoded).- Parameters:
name
- The attribute name.- Returns:
- The byte array or null on error.
-
set
Stores the byte array with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInInteger
Retrieves the Integer value for name.- Parameters:
name
- The attribute name.- Returns:
- The Integer or null on error.
-
set
Stores the Integer with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInBigIntegerArray
Retrieves the BigInteger array value for name.- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Stores the BigInteger array with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInDate
Retrieves the Date value for name.- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Stores the Date with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInStringArray
Retrieves the String array value for name.- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Stores the String array with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- False on error.
-
getInCert
Retrieves the X509CertImpl value for name.- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Stores the X509CertImpl with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on error
-
getInCertExts
public org.mozilla.jss.netscape.security.x509.CertificateExtensions getInCertExts(String name) throws IOException Retrieves the CertificateExtensions value for name.- Parameters:
name
- The attribute name.- Returns:
- The value.
- Throws:
IOException
-
set
Stores the CertificateExtensions with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on error
-
getInCertificates
Retrieves the Certificates value for name.- Parameters:
name
- The attribute name.- Returns:
- The value.
- Throws:
IOException
CertificateException
-
set
Stores the Certificates with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on error
-
getInByteArrayArray
Retrieves the byte[][] value for name.- Parameters:
name
- The attribute name.- Returns:
- The value.
- Throws:
IOException
-
set
Stores the byte[][] with the associated key.- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on error
-
getVals
Enumerate all attribute values in the AuthToken.- Returns:
- Enumeration of all attribute names in this AuthToken.
-
getAuthManagerInstName
Gets the name of the authentication manager instance that created this token.- Returns:
- The name of the authentication manager instance that created this token.
-
getAuthTime
Gets the time of authentication.- Returns:
- The time of authentication
-