Interface Authenticator
-
- All Known Implementing Classes:
AbstractAuthenticator,ActivitiAuthenticator,AlfrescoAuthenticator
public interface AuthenticatorInterface that defines an Authenticator. Authenticators are used to retrieve cookies and tokens from a remote service based on credentials which are locally managed and passed to the remote service. Authenticator objects are used when a "token" must be passed to the endpoint and the current token is either invalid or non-existent. The Connectors must then handshake with the endpoint to acquire a token. Tokens are not always necessary. An example is HTTP Basic Authentication where user names and passwords are sent on every request. Alternatively, of course, you may wish only to authenticate on the first request and then pass the Authenticate hash on every subsequent request. In that case, the role of the authenticate() method would be to handshake with the endpoint to acquire this hash.- Author:
- muzquiano
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConnectorSessionauthenticate(java.lang.String endpoint, Credentials credentials, ConnectorSession connectorSession)Authenticate against the given Endpoint URL with the supplied CredentialsbooleanisAuthenticated(java.lang.String endpoint, ConnectorSession connectorSession)Returns whether the current connector session has been authenticated or not
-
-
-
Method Detail
-
authenticate
ConnectorSession authenticate(java.lang.String endpoint, Credentials credentials, ConnectorSession connectorSession) throws AuthenticationException
Authenticate against the given Endpoint URL with the supplied Credentials- Returns:
- The connector session instance
- Throws:
AuthenticationException- on error
-
isAuthenticated
boolean isAuthenticated(java.lang.String endpoint, ConnectorSession connectorSession)Returns whether the current connector session has been authenticated or not- Parameters:
endpoint- StringconnectorSession- ConnectorSession- Returns:
- boolean
-
-