Package com.emc.documentum.rest.security.provider

# Class AbstractAuthProvider

java.lang.Object
com.emc.documentum.rest.security.provider.AbstractAuthProvider

Direct Known Subclasses:
  `AbstractClientTokenAuthProvider`

public abstract class AbstractAuthProvider extends Object
This abstract provider provides DFC session operation.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected RepositorySessionManager`
  `memoryRepositorySessionManager`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractAuthProvider()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `allowLoginAuditing()`
  The default implementation of this method returns true, indicating that login auditing is allowed for all the providers.
  `protected void`
  `clearCache(String repositoryName, String user, Object password, AuthType authType)`
  Clear Ehcache memory session manager by input.
  `protected com.documentum.fc.client.IDfSession`
  `getSession(com.documentum.fc.client.IDfSessionManager manager, String repositoryName)`
  Get a DFC session from a DFC session manager.
  `protected org.springframework.security.authentication.AuthenticationServiceException`
  `getWrappedException(com.documentum.fc.client.IDfSessionManager manager, String repositoryName, com.documentum.fc.common.DfException e)`
  Convert DFC exception to an authentication exception.
  `protected void`
  `logAuthenticationFailure(com.documentum.fc.client.IDfSession session, String repositoryName, String user)`
  `protected void`
  `onSuccessfulSessionRetrieval(com.documentum.fc.client.IDfSession session)`
  This method is called after a successful session retrieval.
  `void`
  `setRepositorySessionManager(RepositorySessionManager manager)`
  Set repository session manager.

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

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

- ## Field Details

  - ### memoryRepositorySessionManager

    protected RepositorySessionManager memoryRepositorySessionManager

- ## Constructor Details

  - ### AbstractAuthProvider

    public AbstractAuthProvider()

- ## Method Details

  - ### setRepositorySessionManager

    public void setRepositorySessionManager(RepositorySessionManager manager)
    Set repository session manager. By default, the Ehcache memory repository session manager is used.
    Parameters:
      `manager` - DFC session manager

  - ### getSession

    protected com.documentum.fc.client.IDfSession getSession(com.documentum.fc.client.IDfSessionManager manager, String repositoryName) throws com.documentum.fc.common.DfException
    Get a DFC session from a DFC session manager.
    Parameters:
      `manager` - session manager
      `repositoryName` - repository name
    Returns:
      DFC session
    Throws:
      `com.documentum.fc.common.DfException` - exceptions

  - ### getWrappedException

    protected org.springframework.security.authentication.AuthenticationServiceException getWrappedException(com.documentum.fc.client.IDfSessionManager manager, String repositoryName, com.documentum.fc.common.DfException e)
    Convert DFC exception to an authentication exception.
    Parameters:
      `manager` - DFC session manager
      `repositoryName` - repository name
      `e` - original DFC exception
    Returns:
      authentication exception

  - ### logAuthenticationFailure

    protected void logAuthenticationFailure(com.documentum.fc.client.IDfSession session, String repositoryName, String user)

  - ### clearCache

    protected void clearCache(String repositoryName, String user, Object password, AuthType authType)
    Clear Ehcache memory session manager by input.
    Parameters:
      `repositoryName` - repository name
      `user` - user login name
      `password` - user password
      `authType` - authentication type
    See Also:
      - `AuthType`

  - ### onSuccessfulSessionRetrieval

    protected void onSuccessfulSessionRetrieval(com.documentum.fc.client.IDfSession session)
    This method is called after a successful session retrieval. It can be overridden by subclasses to perform additional actions on over login auditing.
    Parameters:
      `session` - the successfully retrieved DFC session

  - ### allowLoginAuditing

    protected boolean allowLoginAuditing()
    The default implementation of this method returns true, indicating that login auditing is allowed for all the providers. If any provider does not need this functionality, it can override this method to return false. For example, the ClientTokenAuthProvider does not need login auditing.