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
HTTP Basic Authentication for Public Api.
Adapted from org.alfresco.module.org_alfresco_module_cloud.webscripts.TenantBasicHTTPAuthenticatorFactory.
- Author:
- sglover
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassPublic api authentication with additional tenant applicability checkNested classes/interfaces inherited from class org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
RemoteUserAuthenticatorFactory.RemoteUserAuthenticatorNested classes/interfaces inherited from class org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
BasicHttpAuthenticatorFactory.BasicHttpAuthenticator -
Field Summary
FieldsFields inherited from class org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
adminConsoleAuthenticator, authenticationComponent, GET_REMOTE_USER_TIMEOUT_MILLISECONDS_DEFAULT, remoteUserMapper, webScriptsHomeAuthenticatorFields inherited from class org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
authenticationService, authorityService, listener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.extensions.webscripts.Authenticatorcreate(org.springframework.extensions.webscripts.servlet.WebScriptServletRequest req, org.springframework.extensions.webscripts.servlet.WebScriptServletResponse res) voidsetAuthenticatorKeyHeader(String authenticatorKeyHeader) voidsetOutboundHeaders(Set<String> outboundHeaders) Set the headers passed to the gateway for authentication.voidvoidvoidsetUseBasicAuth(boolean useBasicAuth) Whether to suggest that users use Basic auth.voidsetValidAuthentictorKeys(Set<String> validKeys) Methods inherited from class org.alfresco.repo.web.scripts.servlet.RemoteUserAuthenticatorFactory
getAdminConsoleScriptFamilies, getGetRemoteUserTimeoutMilliseconds, isAlwaysAllowBasicAuthForAdminConsole, isAlwaysAllowBasicAuthForWebScriptsHome, setAdminConsoleAuthenticator, setAdminConsoleScriptFamilies, setAlwaysAllowBasicAuthForAdminConsole, setAlwaysAllowBasicAuthForWebScriptsHome, setAuthenticationComponent, setGetRemoteUserTimeoutMilliseconds, setRemoteUserMapper, setWebScriptsHomeAuthenticatorMethods inherited from class org.alfresco.repo.web.scripts.servlet.BasicHttpAuthenticatorFactory
getAuthorityService, setAuthenticationListener, setAuthenticationService, setAuthorityService
-
Field Details
-
DEFAULT_AUTHENTICATOR_KEY_HEADER
- See Also:
-
-
Constructor Details
-
PublicApiAuthenticatorFactory
public PublicApiAuthenticatorFactory()
-
-
Method Details
-
setAuthenticatorKeyHeader
-
setOutboundHeaders
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:
-
setTenantAuthentication
-
setTransactionHelper
-
setValidAuthentictorKeys
-
create
public org.springframework.extensions.webscripts.Authenticator create(org.springframework.extensions.webscripts.servlet.WebScriptServletRequest req, org.springframework.extensions.webscripts.servlet.WebScriptServletResponse res) - Specified by:
createin interfaceorg.springframework.extensions.webscripts.servlet.ServletAuthenticatorFactory- Overrides:
createin classRemoteUserAuthenticatorFactory
-