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 Stringstatic final Stringstatic final Stringstatic final StringName of the authentication manager that created the AuthToken as a string.static final StringTime of authentication as a java.util.Datestatic final StringCertificate to be renewedstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringCertificate to be revokedstatic final Stringstatic final Stringstatic final StringConstant for userid.static final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionAuthToken(AuthManager authMgr) Constructs an instance of a authentication token. -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves 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.X509CertImplRetrieves the X509CertImpl value for name.org.mozilla.jss.netscape.security.x509.CertificateExtensionsgetInCertExts(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.booleanStores the byte array with the associated key.booleanStores the byte[][] with the associated key.booleanset(String name, Certificates value) Stores the Certificates with the associated key.booleanStores the Integer with the associated key.booleanSets an attribute value within this AttrSet.booleanStores the String array with the associated key.booleanset(String name, BigInteger[] value) Stores the BigInteger array with the associated key.booleanStores the Date with the associated key.booleanStores the CertificateExtensions with the associated key.booleanStores the X509CertImpl with the associated key.
-
Field Details
-
USER
-
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
-
TOKEN_CERT_TO_REVOKE
-
TOKEN_AUTHMGR_INST_NAME
Name of the authentication manager that created the AuthToken as a string.- See Also:
-
TOKEN_AUTHTIME
-
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
-
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
-
set
-
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
-
set
-
getInStringArray
-
set
-
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:
IOExceptionCertificateException
-
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
-