java.lang.Object
org.springframework.extensions.webscripts.connector.CredentialsImpl
All Implemented Interfaces:
Serializable, Credentials

public class CredentialsImpl extends Object implements Credentials, Serializable
Credentials for a given user. This stores credentials that are to be passed to a back-end service in order to authenticate. Once these credentials are used to authenticate, they may no longer be necessary as the service may hand back "endpoint credentials" which are to be used on subsequent calls. An example of a user credential might be username/password. An example of an endpoint credential might be an Alfresco ticket.
Author:
muzquiano
See Also:
  • Field Details

    • persistent

      protected boolean persistent
    • endpointId

      protected String endpointId
    • properties

      protected HashMap<String,Object> properties
  • Constructor Details

    • CredentialsImpl

      public CredentialsImpl(String endpointId)
      Instantiates a new user credential.
      Parameters:
      endpointId - the endpoint id
  • Method Details

    • getEndpointId

      public String getEndpointId()
      Description copied from interface: Credentials
      Gets the endpoint id.
      Specified by:
      getEndpointId in interface Credentials
      Returns:
      the endpoint id
    • getProperty

      public Object getProperty(String key)
      Description copied from interface: Credentials
      Gets a given property
      Specified by:
      getProperty in interface Credentials
      Parameters:
      key - the key
      Returns:
      the property
    • setProperty

      public void setProperty(String key, Object value)
      Description copied from interface: Credentials
      Sets a given property
      Specified by:
      setProperty in interface Credentials
      Parameters:
      key - the key
      value - the value
    • removeProperty

      public void removeProperty(String key)
      Description copied from interface: Credentials
      Removes a given property
      Specified by:
      removeProperty in interface Credentials
      Parameters:
      key - String
    • removeAllProperties

      public void removeAllProperties(String key)
      Description copied from interface: Credentials
      Removes all properties
      Specified by:
      removeAllProperties in interface Credentials
      Parameters:
      key - String
    • getPropertyKeys

      public String[] getPropertyKeys()
      Description copied from interface: Credentials
      Returns the property keys
      Specified by:
      getPropertyKeys in interface Credentials
      Returns:
      array of property keys
    • isPersistent

      public boolean isPersistent()
      Description copied from interface: Credentials
      Returns whether this credential is persistent A persistent credential is written to a persistent vault. A non-persistent credential is loaded into the vault but never stored
      Specified by:
      isPersistent in interface Credentials
      Returns:
      boolean
    • toString

      public String toString()
      Overrides:
      toString in class Object