Interface RemoteCredentialsService

All Known Implementing Classes:
RemoteCredentialsServiceImpl

public interface RemoteCredentialsService
The core Remote Credentials service. This provides low level support for storing, retrieving and finding remote credentials. Most users will want something built on top of this, eg to do the OAuth Dance. The "Remote System" name chosen by systems built on top of this need to be unique, to avoid clashes. Where there is only one thing that is talked to (eg Twitter, Flickr, Alfresco Cloud), then the "Remote System Name" should be the name of the system. Where one service can talk to multiple systems, the system hostname should be used as a suffix, such as "OpenID-livejournal.com" and "OpenID-stackexchange.net", so they can be differentiated.
Since:
4.0.2
Author:
Nick Burch
  • Method Details

    • createPersonCredentials

      BaseCredentialsInfo createPersonCredentials(String remoteSystem, BaseCredentialsInfo credentials)
      Stores a new BaseCredentialsInfo for the current user
    • createSharedCredentials

      BaseCredentialsInfo createSharedCredentials(String remoteSystem, BaseCredentialsInfo credentials)
      Stores a new BaseCredentialsInfo for shared use. Permissions should then be set to control access to these.
    • updateCredentials

      BaseCredentialsInfo updateCredentials(BaseCredentialsInfo credentials)
      Updates an existing BaseCredentialsInfo. The type must not change.
    • updateCredentialsAuthenticationSucceeded

      BaseCredentialsInfo updateCredentialsAuthenticationSucceeded(boolean succeeded, BaseCredentialsInfo credentialsInfo)
      Records if the most recent Authentication attempt with a given set of credentials worked or not.
    • deleteCredentials

      void deleteCredentials(BaseCredentialsInfo credentialsInfo)
      Deletes an existing BaseCredentialsInfo from the repository
    • listPersonRemoteSystems

      org.alfresco.query.PagingResults<String> listPersonRemoteSystems(org.alfresco.query.PagingRequest paging)
      Lists all Remote Systems for which credentials are stored for the current user
    • listSharedRemoteSystems

      org.alfresco.query.PagingResults<String> listSharedRemoteSystems(org.alfresco.query.PagingRequest paging)
      Lists all Remote Systems for which the user has access to shared credentials
    • listAllRemoteSystems

      org.alfresco.query.PagingResults<String> listAllRemoteSystems(org.alfresco.query.PagingRequest paging)
      Lists all the Remote Systems for which the user has credentials, either personal ones or shared ones
    • getPersonCredentials

      BaseCredentialsInfo getPersonCredentials(String remoteSystem)
      Fetches the credentials for the current user for the specified System. If multiple credentials exist, the first is returned, so this should only be used for systems where a user is restricted to only one set of credentials per system.
      Returns:
      The Credentials, or Null if none exist for the current user
    • listPersonCredentials

      org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listPersonCredentials(String remoteSystem, QName credentialsType, org.alfresco.query.PagingRequest paging)
      Lists all Credentials for the current user for the given Remote System
      Parameters:
      remoteSystem - The Remote System to return credentials for
      credentialsType - Optional type (including child subtypes) of the credentials to filter by
    • listSharedCredentials

      org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listSharedCredentials(String remoteSystem, QName credentialsType, org.alfresco.query.PagingRequest paging)
      Lists all Credentials that are shared with the current user for the given Remote System
      Parameters:
      remoteSystem - The Remote System to return credentials for
      credentialsType - Optional type (including child subtypes) of the credentials to filter by
    • listAllCredentials

      org.alfresco.query.PagingResults<? extends BaseCredentialsInfo> listAllCredentials(String remoteSystem, QName credentialsType, org.alfresco.query.PagingRequest paging)
      Lists all Credentials that the user has access to for the given Remote System
      Parameters:
      remoteSystem - The Remote System to return credentials for
      credentialsType - Optional type (including child subtypes) of the credentials to filter by