Package org.alfresco.rest.api
Class PublicApiAuthenticatorFactory
- java.lang.Object
-
- org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
-
- org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
-
- org.alfresco.rest.api.PublicApiAuthenticatorFactory
-
- All Implemented Interfaces:
org.springframework.extensions.webscripts.servlet.ServletAuthenticatorFactory
public class PublicApiAuthenticatorFactory extends RemoteUserAuthenticatorFactory
HTTP Basic Authentication for Public Api. Adapted from org.alfresco.module.org_alfresco_module_cloud.webscripts.TenantBasicHTTPAuthenticatorFactory.- Author:
- sglover
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PublicApiAuthenticatorFactory.PublicApiAuthenticator
Public api authentication with additional tenant applicability check-
Nested classes/interfaces inherited from class org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
RemoteUserAuthenticatorFactory.RemoteUserAuthenticator
-
Nested classes/interfaces inherited from class org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
BasicHttpAuthenticatorFactory.BasicHttpAuthenticator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_AUTHENTICATOR_KEY_HEADER
-
Fields inherited from class org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
authenticationComponent, remoteUserMapper
-
Fields inherited from class org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
authenticationService, listener
-
-
Constructor Summary
Constructors Constructor Description PublicApiAuthenticatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.extensions.webscripts.Authenticator
create(org.springframework.extensions.webscripts.servlet.WebScriptServletRequest req, org.springframework.extensions.webscripts.servlet.WebScriptServletResponse res)
void
setAuthenticatorKeyHeader(java.lang.String authenticatorKeyHeader)
void
setOutboundHeaders(java.util.Set<java.lang.String> outboundHeaders)
Set the headers passed to the gateway for authentication.void
setTenantAuthentication(TenantAuthentication service)
void
setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper service)
void
setUseBasicAuth(boolean useBasicAuth)
Whether to suggest that users use Basic auth.void
setValidAuthentictorKeys(java.util.Set<java.lang.String> validKeys)
-
Methods inherited from class org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
setAuthenticationComponent, setRemoteUserMapper
-
Methods inherited from class org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
setAuthenticationListener, setAuthenticationService
-
-
-
-
Field Detail
-
DEFAULT_AUTHENTICATOR_KEY_HEADER
public static final java.lang.String DEFAULT_AUTHENTICATOR_KEY_HEADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
setAuthenticatorKeyHeader
public void setAuthenticatorKeyHeader(java.lang.String authenticatorKeyHeader)
-
setOutboundHeaders
public void setOutboundHeaders(java.util.Set<java.lang.String> outboundHeaders)
Set the headers passed to the gateway for authentication.
-
setUseBasicAuth
public void setUseBasicAuth(boolean useBasicAuth)
Whether to suggest that users use Basic auth. If set to true, then a 401 (unauthorized) response will contain a WWW-Authentication header specifying the scheme "Basic". If this is set to false, then the scheme "AlfTicket" will be used.Set this to false to avoid getting Basic auth dialogue popups in browsers when using the public API directly, for example.
- Parameters:
useBasicAuth
-- See Also:
- REPO-2575
-
setTenantAuthentication
public void setTenantAuthentication(TenantAuthentication service)
-
setTransactionHelper
public void setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper service)
-
setValidAuthentictorKeys
public void setValidAuthentictorKeys(java.util.Set<java.lang.String> validKeys)
-
create
public org.springframework.extensions.webscripts.Authenticator create(org.springframework.extensions.webscripts.servlet.WebScriptServletRequest req, org.springframework.extensions.webscripts.servlet.WebScriptServletResponse res)
- Specified by:
create
in interfaceorg.springframework.extensions.webscripts.servlet.ServletAuthenticatorFactory
- Overrides:
create
in classRemoteUserAuthenticatorFactory
-
-