public class AuthToken extends java.lang.Object implements IAuthToken
Modifier and Type | Field and Description |
---|---|
protected java.util.Hashtable<java.lang.String,java.lang.Object> |
mAttrs |
static java.lang.String |
TOKEN_AUTHMGR_INST_NAME
Name of the authentication manager that created the AuthToken
as a string.
|
static java.lang.String |
TOKEN_AUTHTIME
Time of authentication as a java.util.Date
|
static java.lang.String |
TOKEN_CERT
Certificate to be renewed
|
static java.lang.String |
TOKEN_CERT_EXTENSIONS |
static java.lang.String |
TOKEN_CERT_NOTAFTER |
static java.lang.String |
TOKEN_CERT_NOTBEFORE |
static java.lang.String |
TOKEN_CERT_SERIALNUM |
static java.lang.String |
TOKEN_CERT_SUBJECT |
static java.lang.String |
TOKEN_CERT_TO_REVOKE |
GROUPS, UID, USER_ID
Constructor and Description |
---|
AuthToken(IAuthManager authMgr)
Constructs an instance of a authentication token.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(java.lang.String attrName)
Removes an attribute in the AuthToken
|
java.lang.Object |
get(java.lang.String attrName)
Gets an attribute value.
|
java.lang.String |
getAuthManagerInstName()
Gets the name of the authentication manager instance that created
this token.
|
java.util.Date |
getAuthTime()
Gets the time of authentication.
|
java.util.Enumeration<java.lang.String> |
getElements()
Enumerate all attribute names in the AuthToken.
|
java.math.BigInteger[] |
getInBigIntegerArray(java.lang.String name)
Retrieves the BigInteger array value for name.
|
byte[] |
getInByteArray(java.lang.String name)
Retrieves the byte array value for name.
|
byte[][] |
getInByteArrayArray(java.lang.String name)
Retrieves the byte[][] value for name.
|
netscape.security.x509.X509CertImpl |
getInCert(java.lang.String name)
Retrieves the X509CertImpl value for name.
|
netscape.security.x509.CertificateExtensions |
getInCertExts(java.lang.String name)
Retrieves the CertificateExtensions value for name.
|
Certificates |
getInCertificates(java.lang.String name)
Retrieves the Certificates value for name.
|
java.util.Date |
getInDate(java.lang.String name)
Retrieves the Date value for name.
|
java.lang.Integer |
getInInteger(java.lang.String name)
Retrieves the Integer value for name.
|
java.lang.String |
getInString(java.lang.String attrName)
Gets an attribute value.
|
java.lang.String[] |
getInStringArray(java.lang.String name)
Retrieves the String array value for name.
|
java.util.Enumeration<java.lang.Object> |
getVals()
Enumerate all attribute values in the AuthToken.
|
boolean |
set(java.lang.String name,
java.math.BigInteger[] value)
Stores the BigInteger array with the associated key.
|
boolean |
set(java.lang.String name,
byte[] value)
Stores the byte array with the associated key.
|
boolean |
set(java.lang.String name,
byte[][] value)
Stores the byte[][] with the associated key.
|
boolean |
set(java.lang.String name,
netscape.security.x509.CertificateExtensions value)
Stores the CertificateExtensions with the associated key.
|
boolean |
set(java.lang.String name,
Certificates value)
Stores the Certificates with the associated key.
|
boolean |
set(java.lang.String name,
java.util.Date value)
Stores the Date with the associated key.
|
boolean |
set(java.lang.String name,
java.lang.Integer value)
Stores the Integer with the associated key.
|
boolean |
set(java.lang.String attrName,
java.lang.String value)
Sets an attribute value within this AttrSet.
|
boolean |
set(java.lang.String name,
java.lang.String[] value)
Stores the String array with the associated key.
|
boolean |
set(java.lang.String name,
netscape.security.x509.X509CertImpl value)
Stores the X509CertImpl with the associated key.
|
protected java.util.Hashtable<java.lang.String,java.lang.Object> mAttrs
public static final java.lang.String TOKEN_CERT_SUBJECT
public static final java.lang.String TOKEN_CERT_NOTBEFORE
public static final java.lang.String TOKEN_CERT_NOTAFTER
public static final java.lang.String TOKEN_CERT_EXTENSIONS
public static final java.lang.String TOKEN_CERT_SERIALNUM
public static final java.lang.String TOKEN_CERT
public static final java.lang.String TOKEN_CERT_TO_REVOKE
public static final java.lang.String TOKEN_AUTHMGR_INST_NAME
public static final java.lang.String TOKEN_AUTHTIME
public AuthToken(IAuthManager authMgr)
"authMgrInstName" - The authentication manager instance name. "authTime" - The - The time of authentication.
authMgr
- The authentication manager that created this Token.public java.lang.Object get(java.lang.String attrName)
IAuthToken
get
in interface IAuthToken
attrName
- the name of the attribute to return.public java.lang.String getInString(java.lang.String attrName)
IAuthToken
getInString
in interface IAuthToken
attrName
- the name of the attribute to return.public boolean set(java.lang.String attrName, java.lang.String value)
IAuthToken
set
in interface IAuthToken
attrName
- the name of the attributevalue
- the attribute object.public void delete(java.lang.String attrName)
attrName
- The name of the attribute to remove.public java.util.Enumeration<java.lang.String> getElements()
getElements
in interface IAuthToken
public byte[] getInByteArray(java.lang.String name)
IAuthToken
getInByteArray
in interface IAuthToken
name
- The attribute name.public boolean set(java.lang.String name, byte[] value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic java.lang.Integer getInInteger(java.lang.String name)
IAuthToken
getInInteger
in interface IAuthToken
name
- The attribute name.public boolean set(java.lang.String name, java.lang.Integer value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic java.math.BigInteger[] getInBigIntegerArray(java.lang.String name)
IAuthToken
getInBigIntegerArray
in interface IAuthToken
name
- The attribute name.public boolean set(java.lang.String name, java.math.BigInteger[] value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic java.util.Date getInDate(java.lang.String name)
IAuthToken
getInDate
in interface IAuthToken
name
- The attribute name.public boolean set(java.lang.String name, java.util.Date value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic java.lang.String[] getInStringArray(java.lang.String name)
IAuthToken
getInStringArray
in interface IAuthToken
name
- The attribute name.public boolean set(java.lang.String name, java.lang.String[] value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic netscape.security.x509.X509CertImpl getInCert(java.lang.String name)
IAuthToken
getInCert
in interface IAuthToken
name
- The attribute name.public boolean set(java.lang.String name, netscape.security.x509.X509CertImpl value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic netscape.security.x509.CertificateExtensions getInCertExts(java.lang.String name) throws java.io.IOException
IAuthToken
getInCertExts
in interface IAuthToken
name
- The attribute name.java.io.IOException
public boolean set(java.lang.String name, netscape.security.x509.CertificateExtensions value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic Certificates getInCertificates(java.lang.String name) throws java.io.IOException, java.security.cert.CertificateException
IAuthToken
getInCertificates
in interface IAuthToken
name
- The attribute name.java.io.IOException
java.security.cert.CertificateException
public boolean set(java.lang.String name, Certificates value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic byte[][] getInByteArrayArray(java.lang.String name) throws java.io.IOException
IAuthToken
getInByteArrayArray
in interface IAuthToken
name
- The attribute name.java.io.IOException
public boolean set(java.lang.String name, byte[][] value)
IAuthToken
set
in interface IAuthToken
name
- The attribute name.value
- The value to storepublic java.util.Enumeration<java.lang.Object> getVals()
public java.lang.String getAuthManagerInstName()
public java.util.Date getAuthTime()