Class AuthToken
java.lang.Object
org.dogtagpki.server.authentication.AuthToken
- All Implemented Interfaces:
IAuthToken
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
FieldsFields inherited from interface com.netscape.certsrv.authentication.IAuthToken
GROUP, GROUPS, TOKEN_AUTHENTICATED_CERT_SUBJECT, TOKEN_AUTHMGR_INST_NAME, TOKEN_AUTHTIME, TOKEN_CERT, TOKEN_CERT_EXTENSIONS, TOKEN_CERT_NOTAFTER, TOKEN_CERT_NOTBEFORE, TOKEN_CERT_SERIALNUM, TOKEN_CERT_SUBJECT, TOKEN_CERT_TO_REVOKE, TOKEN_SHARED_TOKEN_AUTHENTICATED_CERT_SUBJECT, UID, USER, USER_DN, USER_ID
-
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
-
mAttrs
-
-
Constructor Details
-
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
Description copied from interface:IAuthToken
Gets an attribute value.- Specified by:
get
in interfaceIAuthToken
- Parameters:
attrName
- the name of the attribute to return.- Returns:
- the attribute value
-
getInString
Description copied from interface:IAuthToken
Gets an attribute value.- Specified by:
getInString
in interfaceIAuthToken
- Parameters:
attrName
- the name of the attribute to return.- Returns:
- the attribute value
-
set
Description copied from interface:IAuthToken
Sets an attribute value within this AttrSet.- Specified by:
set
in interfaceIAuthToken
- 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.- Specified by:
getElements
in interfaceIAuthToken
- Returns:
- Enumeration of all attribute names in this AuthToken.
-
getInByteArray
Description copied from interface:IAuthToken
Retrieves the byte array value for name. The value should have been previously stored as a byte array (it will be CMS.AtoB decoded).- Specified by:
getInByteArray
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The byte array or null on error.
-
set
Description copied from interface:IAuthToken
Stores the byte array with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInInteger
Description copied from interface:IAuthToken
Retrieves the Integer value for name.- Specified by:
getInInteger
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The Integer or null on error.
-
set
Description copied from interface:IAuthToken
Stores the Integer with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInBigIntegerArray
Description copied from interface:IAuthToken
Retrieves the BigInteger array value for name.- Specified by:
getInBigIntegerArray
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Description copied from interface:IAuthToken
Stores the BigInteger array with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInDate
Description copied from interface:IAuthToken
Retrieves the Date value for name.- Specified by:
getInDate
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Description copied from interface:IAuthToken
Stores the Date with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on an error
-
getInStringArray
Description copied from interface:IAuthToken
Retrieves the String array value for name.- Specified by:
getInStringArray
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Description copied from interface:IAuthToken
Stores the String array with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- False on error.
-
getInCert
Description copied from interface:IAuthToken
Retrieves the X509CertImpl value for name.- Specified by:
getInCert
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value or null on error.
-
set
Description copied from interface:IAuthToken
Stores the X509CertImpl with the associated key.- Specified by:
set
in interfaceIAuthToken
- 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 Description copied from interface:IAuthToken
Retrieves the CertificateExtensions value for name.- Specified by:
getInCertExts
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value.
- Throws:
IOException
-
set
Description copied from interface:IAuthToken
Stores the CertificateExtensions with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on error
-
getInCertificates
Description copied from interface:IAuthToken
Retrieves the Certificates value for name.- Specified by:
getInCertificates
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value.
- Throws:
IOException
CertificateException
-
set
Description copied from interface:IAuthToken
Stores the Certificates with the associated key.- Specified by:
set
in interfaceIAuthToken
- Parameters:
name
- The attribute name.value
- The value to store- Returns:
- false on error
-
getInByteArrayArray
Description copied from interface:IAuthToken
Retrieves the byte[][] value for name.- Specified by:
getInByteArrayArray
in interfaceIAuthToken
- Parameters:
name
- The attribute name.- Returns:
- The value.
- Throws:
IOException
-
set
Description copied from interface:IAuthToken
Stores the byte[][] with the associated key.- Specified by:
set
in interfaceIAuthToken
- 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
-