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 Summary
Modifier and TypeMethodDescriptioncreatePersonCredentials(String remoteSystem, BaseCredentialsInfo credentials) Stores a newBaseCredentialsInfofor the current usercreateSharedCredentials(String remoteSystem, BaseCredentialsInfo credentials) Stores a newBaseCredentialsInfofor shared use.voiddeleteCredentials(BaseCredentialsInfo credentialsInfo) Deletes an existingBaseCredentialsInfofrom the repositorygetPersonCredentials(String remoteSystem) Fetches the credentials for the current user for the specified System.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 Systemorg.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 onesorg.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 Systemorg.alfresco.query.PagingResults<String>listPersonRemoteSystems(org.alfresco.query.PagingRequest paging) Lists all Remote Systems for which credentials are stored for the current userorg.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 Systemorg.alfresco.query.PagingResults<String>listSharedRemoteSystems(org.alfresco.query.PagingRequest paging) Lists all Remote Systems for which the user has access to shared credentialsupdateCredentials(BaseCredentialsInfo credentials) Updates an existingBaseCredentialsInfo.updateCredentialsAuthenticationSucceeded(boolean succeeded, BaseCredentialsInfo credentialsInfo) Records if the most recent Authentication attempt with a given set of credentials worked or not.
-
Method Details
-
createPersonCredentials
Stores a newBaseCredentialsInfofor the current user -
updateCredentials
Updates an existingBaseCredentialsInfo. 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
Deletes an existingBaseCredentialsInfofrom 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 -
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
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 forcredentialsType- 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 forcredentialsType- Optional type (including child subtypes) of the credentials to filter by
-