Package com.emc.documentum.rest.security.ticket

# Class ClientToken

java.lang.Object
com.emc.documentum.rest.security.ticket.ClientToken

All Implemented Interfaces:
  `Serializable`

public class ClientToken extends Object implements Serializable
Data model for Documentum Client Token.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `ClientToken.TokenField`
  Token fields for client token

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CHARSET`
  `static final String`
  `ENTRY_DELIMITER`
  `static final String`
  `INVALID_CLIENT_TOKEN`
  `static final String`
  `KV_DELIMITER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClientToken(String dt, String principal, String domain, Map<ClientToken.TokenField,?> others)`
  Constructor which instantiates the client token by login ticket string.
  `ClientToken(Map<ClientToken.TokenField,Object> all)`
  Constructor which instantiates the client token by fields.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `delaySetCSRFToken(Map<ClientToken.TokenField,?> csrf)`
  Delay set CSRF token for the client token.
  `static ClientToken`
  `deserializeFrom(String clientTokenString)`
  Deserialize client token from a serialized string.
  `Date`
  `getCreatedTime()`
  Get token creation date.
  `String`
  `getCSRFHeaderName()`
  Get CSRF header name.
  `String`
  `getCSRFQueryName()`
  Get CSRF query parameter.
  `String`
  `getCSRFToken()`
  Get CSRF token.
  `String`
  `getCSRFTokenMessageDigest()`
  Get CSRF token digest.
  `String`
  `getDocumentumLoginTicket()`
  Get documentum login ticket.
  `String`
  `getDomain()`
  Get user domain.
  `Date`
  `getExpireTime()`
  Get token expiration date.
  `String`
  `getIssuer()`
  Get token issuer.
  `Date`
  `getLoginTicketExpireTime()`
  Get the login ticket expiration time.
  `int`
  `getMaxAge()`
  Get the token max age in seconds.
  `String`
  `getPrincipal()`
  Get user principal.
  `String`
  `serialize()`
  Serialize the client token into a string.
  `protected String`
  `serializeAsString()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### INVALID_CLIENT_TOKEN

    public static final String INVALID_CLIENT_TOKEN
    See Also:
      - Constant Field Values

  - ### ENTRY_DELIMITER

    public static final String ENTRY_DELIMITER
    See Also:
      - Constant Field Values

  - ### KV_DELIMITER

    public static final String KV_DELIMITER
    See Also:
      - Constant Field Values

  - ### CHARSET

    public static final String CHARSET
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ClientToken

    public ClientToken(String dt, String principal, String domain, Map<ClientToken.TokenField,?> others)
    Constructor which instantiates the client token by login ticket string.
    Parameters:
      `dt` - documentum login ticket in String
      `principal` - user principal
      `domain` - user domain
      `others` - token fields

  - ### ClientToken

    public ClientToken(Map<ClientToken.TokenField,Object> all)
    Constructor which instantiates the client token by fields.
    Parameters:
      `all` - token fields

- ## Method Details

  - ### getPrincipal

    public String getPrincipal()
    Get user principal.
    Returns:
      user principal

  - ### getCreatedTime

    public Date getCreatedTime()
    Get token creation date.
    Returns:
      the token creation date

  - ### getExpireTime

    public Date getExpireTime()
    Get token expiration date.
    Returns:
      the token expiration date

  - ### getMaxAge

    public int getMaxAge()
    Get the token max age in seconds.
    Returns:
      the token max age

  - ### getLoginTicketExpireTime

    public Date getLoginTicketExpireTime()
    Get the login ticket expiration time.
    Returns:
      the login ticket expration time

  - ### getIssuer

    public String getIssuer()
    Get token issuer.
    Returns:
      the token issuer

  - ### getDomain

    public String getDomain()
    Get user domain.
    Returns:
      the user domain

  - ### getDocumentumLoginTicket

    public String getDocumentumLoginTicket()
    Get documentum login ticket.
    Returns:
      the documentum login ticket

  - ### getCSRFToken

    public String getCSRFToken()
    Get CSRF token.
    Returns:
      the CSRF token

  - ### getCSRFHeaderName

    public String getCSRFHeaderName()
    Get CSRF header name.
    Returns:
      the CSRF header name

  - ### getCSRFQueryName

    public String getCSRFQueryName()
    Get CSRF query parameter.
    Returns:
      the CSRF query parameter

  - ### getCSRFTokenMessageDigest

    public String getCSRFTokenMessageDigest()
    Get CSRF token digest.
    Returns:
      the CSRF token digest

  - ### delaySetCSRFToken

    public void delaySetCSRFToken(Map<ClientToken.TokenField,?> csrf)
    Delay set CSRF token for the client token. If the CSRF token has already been set or the input fields do not contain the complete CSRF fields, a `CSRFServerException` will be thrown.
    Parameters:
      `csrf` - CSRF related fields

  - ### serialize

    public String serialize()
    Serialize the client token into a string.
    Returns:
      the serialized string

  - ### deserializeFrom

    public static ClientToken deserializeFrom(String clientTokenString)
    Deserialize client token from a serialized string.
    Parameters:
      `clientTokenString` - client token in serialized string
    Returns:
      client token

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### serializeAsString

    protected String serializeAsString()