public interface RemoteAlfrescoTicketService
RemoteCredentialsService
, and handles ticket
negotiation for you.
Currently only Username+Password credentials, exchanged for a
regular alf_ticket Alfresco Ticket are supported, but
things like OAuth should be supportable too later.
All Remote Systems must be registered with this service before
use, supplying details of where to find the remote Alfresco
for a given Remote System ID. The Remote System names should
follow the system naming convention from RemoteCredentialsService
TODO OAuth supportModifier and Type | Method and Description |
---|---|
boolean |
deleteRemoteCredentials(String remoteSystemId)
Deletes the remote credentials (if any) for the current user
|
RemoteAlfrescoTicketInfo |
getAlfrescoTicket(String remoteSystemId)
Returns the current Alfresco Ticket for the current user on
the remote system, fetching if it isn't already cached.
|
BaseCredentialsInfo |
getRemoteCredentials(String remoteSystemId)
Retrieves the remote credentials (if any) for the current user
|
RemoteAlfrescoTicketInfo |
refetchAlfrescoTicket(String remoteSystemId)
Forces a re-fetch of the Alfresco Ticket for the current user,
if possible, and marks the credentials as failing if not.
|
void |
registerRemoteSystem(String remoteSystemId,
String baseUrl,
Map<String,String> requestHeaders)
Registers the details of a new Remote System with the service.
|
BaseCredentialsInfo |
storeRemoteCredentials(String remoteSystemId,
String username,
String password)
Validates and stores the remote credentials for the current user
|
BaseCredentialsInfo storeRemoteCredentials(String remoteSystemId, String username, String password) throws org.alfresco.repo.security.authentication.AuthenticationException, RemoteSystemUnavailableException, NoSuchSystemException
remoteSystemId
- The ID of the remote system, as registered with the serviceorg.alfresco.repo.security.authentication.AuthenticationException
- If the credentials are invalidRemoteSystemUnavailableException
- If the remote system is unavailableNoSuchSystemException
- If no system has been registered with the given IDBaseCredentialsInfo getRemoteCredentials(String remoteSystemId) throws NoSuchSystemException
remoteSystemId
- The ID of the remote system, as registered with the serviceNoSuchSystemException
- If no system has been registered with the given IDboolean deleteRemoteCredentials(String remoteSystemId) throws NoSuchSystemException
remoteSystemId
- The ID of the remote system, as registered with the serviceNoSuchSystemException
- If no system has been registered with the given IDRemoteAlfrescoTicketInfo getAlfrescoTicket(String remoteSystemId) throws org.alfresco.repo.security.authentication.AuthenticationException, NoCredentialsFoundException, NoSuchSystemException, RemoteSystemUnavailableException
refetchAlfrescoTicket(String)
to ensure you have
the latest ticket, and re-try the request.remoteSystemId
- The ID of the remote system, as registered with the serviceorg.alfresco.repo.security.authentication.AuthenticationException
- If the stored remote credentials are now invalidNoCredentialsFoundException
- If the user has no stored credentials for the remote systemNoSuchSystemException
- If no system has been registered with the given IDRemoteSystemUnavailableException
- If it was not possible to talk to the remote systemRemoteAlfrescoTicketInfo refetchAlfrescoTicket(String remoteSystemId) throws org.alfresco.repo.security.authentication.AuthenticationException, NoCredentialsFoundException, NoSuchSystemException, RemoteSystemUnavailableException
getAlfrescoTicket(String)
should be used initially, with
this only used if the ticket received is rejected by the remote server.remoteSystemId
- The ID of the remote system, as registered with the serviceorg.alfresco.repo.security.authentication.AuthenticationException
- If the stored remote credentials are now invalidNoCredentialsFoundException
- If the user has no stored credentials for the remote systemNoSuchSystemException
- If no system has been registered with the given IDRemoteSystemUnavailableException
- If it was not possible to talk to the remote systemvoid registerRemoteSystem(String remoteSystemId, String baseUrl, Map<String,String> requestHeaders)
remoteSystemId
- The ID to be used to identify the systembaseUrl
- The base URL of Alfresco Services on the remote system, eg http://localhost:8080/alfresco/service/requestHeaders
- Any HTTP headers that must be sent with the request when talking to the serverCopyright © 2005–2017 Alfresco Software. All rights reserved.