diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java index eae282c02..0a2b1f0a2 100644 --- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java +++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java @@ -41,10 +41,11 @@ import com.netscape.certsrv.usrgrp.Certificates; * 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 + * authentication was done against. Each authentication manager has + * its own list of such information. See individual authenticaiton * manager for more details. * <p> + * * @version $Revision$, $Date$ */ public class AuthToken implements IAuthToken { @@ -74,7 +75,7 @@ public class AuthToken implements IAuthToken { public static final String TOKEN_CERT_TO_REVOKE = "tokenCertToRevoke"; /** - * Plugin name of the authentication manager that created the + * Plugin name of the authentication manager that created the * AuthToken as a string. */ public static final String TOKEN_AUTHMGR_IMPL_NAME = "authMgrImplName"; @@ -86,31 +87,33 @@ public class AuthToken implements IAuthToken { public static final String TOKEN_AUTHMGR_INST_NAME = "authMgrInstName"; /** - * Time of authentication as a java.util.Date + * Time of authentication as a java.util.Date */ public static final String TOKEN_AUTHTIME = "authTime"; /** * Constructs an instance of a authentication token. * The token by default contains the following attributes: <br> + * * <pre> - * "authMgrInstName" - The authentication manager instance name. - * "authMgrImplName" - The authentication manager plugin name. - * "authTime" - The - The time of authentication. + * "authMgrInstName" - The authentication manager instance name. + * "authMgrImplName" - The authentication manager plugin name. + * "authTime" - The - The time of authentication. * </pre> + * * @param authMgr The authentication manager that created this Token. */ public AuthToken(IAuthManager authMgr) { mAttrs = new Hashtable<String, Object>(); if (authMgr != null) { - set(TOKEN_AUTHMGR_INST_NAME, authMgr.getName()); - set(TOKEN_AUTHMGR_IMPL_NAME, authMgr.getImplName()); + set(TOKEN_AUTHMGR_INST_NAME, authMgr.getName()); + set(TOKEN_AUTHMGR_IMPL_NAME, authMgr.getImplName()); } set(TOKEN_AUTHTIME, new Date()); } public String getInString(String attrName) { - return (String)mAttrs.get(attrName); + return (String) mAttrs.get(attrName); } public boolean set(String attrName, String value) { @@ -123,6 +126,7 @@ public class AuthToken implements IAuthToken { /** * Removes an attribute in the AuthToken + * * @param attrName The name of the attribute to remove. */ public void delete(String attrName) { @@ -131,6 +135,7 @@ public class AuthToken implements IAuthToken { /** * Enumerate all attribute names in the AuthToken. + * * @return Enumeration of all attribute names in this AuthToken. */ public Enumeration<String> getElements() { @@ -351,7 +356,7 @@ public class AuthToken implements IAuthToken { for (int i = 0; i < certArray.length; i++) { ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); try { - X509CertImpl certImpl = (X509CertImpl)certArray[i]; + X509CertImpl certImpl = (X509CertImpl) certArray[i]; certImpl.encode(byteStream); derValues[i] = new DerValue(byteStream.toByteArray()); } catch (CertificateEncodingException e) { @@ -406,6 +411,7 @@ public class AuthToken implements IAuthToken { /** * Enumerate all attribute values in the AuthToken. + * * @return Enumeration of all attribute names in this AuthToken. */ public Enumeration<Object> getVals() { @@ -413,10 +419,11 @@ public class AuthToken implements IAuthToken { } /** - * Gets the name of the authentication manager instance that created - * this token. - * @return The name of the authentication manager instance that created + * Gets the name of the authentication manager instance that created * this token. + * + * @return The name of the authentication manager instance that created + * this token. */ public String getAuthManagerInstName() { return ((String) mAttrs.get(TOKEN_AUTHMGR_INST_NAME)); @@ -425,8 +432,9 @@ public class AuthToken implements IAuthToken { /** * Gets the plugin name of the authentication manager that created this * token. + * * @return The plugin name of the authentication manager that created this - * token. + * token. */ public String getAuthManagerImplName() { return ((String) mAttrs.get(TOKEN_AUTHMGR_IMPL_NAME)); @@ -434,10 +442,10 @@ public class AuthToken implements IAuthToken { /** * Gets the time of authentication. + * * @return The time of authentication */ public Date getAuthTime() { return ((Date) mAttrs.get(TOKEN_AUTHTIME)); } } - |