Class AuthzToken
- java.lang.Object
-
- com.netscape.certsrv.authorization.AuthzToken
-
- All Implemented Interfaces:
IAttrSet
,java.io.Serializable
public class AuthzToken extends java.lang.Object implements IAttrSet
Authorization token returned by Authorization Managers. Upon return, it contains the name of the authorization manager that create the AuthzToken, the plugin name of the authorization manager, time of authorization happened, name of the resource, type of operation performed on the resource.- Version:
- $Revision$, $Date$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AUTHZ_STATUS_SUCCESS
Constant for the success status of the authorization evaluation.static java.lang.String
TOKEN_AUTHZ_OPERATION
name of the operationstatic java.lang.String
TOKEN_AUTHZ_RESOURCE
name of the resourcestatic java.lang.String
TOKEN_AUTHZ_STATUS
static java.lang.String
TOKEN_AUTHZMGR_IMPL_NAME
Plugin name of the authorization manager that created the AuthzToken as a string.static java.lang.String
TOKEN_AUTHZMGR_INST_NAME
Name of the authorization manager that created the AuthzToken as a string.static java.lang.String
TOKEN_AUTHZTIME
Time of authorization as a java.util.Date
-
Constructor Summary
Constructors Constructor Description AuthzToken(IAuthzManager authzMgr)
Constructs an instance of a authorization token.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(java.lang.String attrName)
Removes an attribute in the AuthzTokenjava.lang.Object
get(java.lang.String attrName)
Get the value of an attribute in the AuthzTokenjava.lang.String
getAuthzManagerImplName()
Gets the plugin name of the authorization manager that created this token.java.lang.String
getAuthzManagerInstName()
Gets the name of the authorization manager instance that created this token.java.util.Date
getAuthzTime()
Gets the time of authorization.java.util.Enumeration<java.lang.String>
getElements()
Enumerate all attribute names in the AuthzToken.java.util.Enumeration<java.lang.Object>
getVals()
Enumerate all attribute values in the AuthzToken.void
set(java.lang.String attrName, java.lang.Object value)
Used by an Authorization manager to set an attribute and value in the AuthzToken.
-
-
-
Field Detail
-
TOKEN_AUTHZMGR_IMPL_NAME
public static final java.lang.String TOKEN_AUTHZMGR_IMPL_NAME
Plugin name of the authorization manager that created the AuthzToken as a string.- See Also:
- Constant Field Values
-
TOKEN_AUTHZMGR_INST_NAME
public static final java.lang.String TOKEN_AUTHZMGR_INST_NAME
Name of the authorization manager that created the AuthzToken as a string.- See Also:
- Constant Field Values
-
TOKEN_AUTHZTIME
public static final java.lang.String TOKEN_AUTHZTIME
Time of authorization as a java.util.Date- See Also:
- Constant Field Values
-
TOKEN_AUTHZ_RESOURCE
public static final java.lang.String TOKEN_AUTHZ_RESOURCE
name of the resource- See Also:
- Constant Field Values
-
TOKEN_AUTHZ_OPERATION
public static final java.lang.String TOKEN_AUTHZ_OPERATION
name of the operation- See Also:
- Constant Field Values
-
TOKEN_AUTHZ_STATUS
public static final java.lang.String TOKEN_AUTHZ_STATUS
- See Also:
- Constant Field Values
-
AUTHZ_STATUS_SUCCESS
public static final java.lang.String AUTHZ_STATUS_SUCCESS
Constant for the success status of the authorization evaluation.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuthzToken
public AuthzToken(IAuthzManager authzMgr)
Constructs an instance of a authorization token. The token by default contains the following attributes:
"authzMgrInstName" - The authorization manager instance name. "authzMgrImplName" - The authorization manager plugin name. "authzTime" - The - The time of authorization.
- Parameters:
authzMgr
- The authorization manager that created this Token.
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.String attrName)
Get the value of an attribute in the AuthzToken
-
set
public void set(java.lang.String attrName, java.lang.Object value)
Used by an Authorization manager to set an attribute and value in the AuthzToken.
-
delete
public void delete(java.lang.String attrName)
Removes an attribute in the AuthzToken
-
getElements
public java.util.Enumeration<java.lang.String> getElements()
Enumerate all attribute names in the AuthzToken.- Specified by:
getElements
in interfaceIAttrSet
- Returns:
- Enumeration of all attribute names in this AuthzToken.
-
getVals
public java.util.Enumeration<java.lang.Object> getVals()
Enumerate all attribute values in the AuthzToken.- Returns:
- Enumeration of all attribute names in this AuthzToken.
-
getAuthzManagerInstName
public java.lang.String getAuthzManagerInstName()
Gets the name of the authorization manager instance that created this token.- Returns:
- The name of the authorization manager instance that created this token.
-
getAuthzManagerImplName
public java.lang.String getAuthzManagerImplName()
Gets the plugin name of the authorization manager that created this token.- Returns:
- The plugin name of the authorization manager that created this token.
-
getAuthzTime
public java.util.Date getAuthzTime()
Gets the time of authorization.- Returns:
- The time of authorization
-
-