Class AlfrescoAuthenticator
- java.lang.Object
-
- org.springframework.extensions.webscripts.connector.AbstractAuthenticator
-
- org.springframework.extensions.webscripts.connector.AlfrescoAuthenticator
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,Authenticator
public class AlfrescoAuthenticator extends AbstractAuthenticator
An implementation of an Alfresco ticket or cookie-based Authenticator.This Authenticator can be plugged into a connector to allow the connector to handshake with an Alfresco Repository. This handshake involves POSTing the username and password to the /api/login WebScript.
A ticket or cookie is returned that is then stored in a connector session.
- Author:
- muzquiano, Kevin Roast
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCS_PARAM_ALF_TICKET
-
Constructor Summary
Constructors Constructor Description AlfrescoAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorSessionauthenticate(java.lang.String endpoint, Credentials credentials, ConnectorSession connectorSession)Authenticate against the given Endpoint URL with the supplied Credentialsprotected java.lang.StringgetLoginURL()booleanisAuthenticated(java.lang.String endpoint, ConnectorSession connectorSession)Returns whether the current connector session has been authenticated or not-
Methods inherited from class org.springframework.extensions.webscripts.connector.AbstractAuthenticator
buildRemoteClient, getConnectorService, processResponse, setApplicationContext
-
-
-
-
Field Detail
-
CS_PARAM_ALF_TICKET
public static final java.lang.String CS_PARAM_ALF_TICKET
- See Also:
- Constant Field Values
-
-
Method Detail
-
authenticate
public ConnectorSession authenticate(java.lang.String endpoint, Credentials credentials, ConnectorSession connectorSession) throws AuthenticationException
Description copied from interface:AuthenticatorAuthenticate against the given Endpoint URL with the supplied Credentials- Returns:
- The connector session instance
- Throws:
AuthenticationException- on error
-
isAuthenticated
public boolean isAuthenticated(java.lang.String endpoint, ConnectorSession connectorSession)Description copied from interface:AuthenticatorReturns whether the current connector session has been authenticated or not- Parameters:
endpoint- StringconnectorSession- ConnectorSession- Returns:
- boolean
-
getLoginURL
protected java.lang.String getLoginURL()
- Returns:
- the REST URL to be used for login requests
-
-