Class 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
  • Field Details

  • Constructor Details

    • PublicApiAuthenticatorFactory

      public PublicApiAuthenticatorFactory()
  • Method Details

    • setAuthenticatorKeyHeader

      public void setAuthenticatorKeyHeader(String authenticatorKeyHeader)
    • setOutboundHeaders

      public void setOutboundHeaders(Set<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:
    • setTenantAuthentication

      public void setTenantAuthentication(TenantAuthentication service)
    • setTransactionHelper

      public void setTransactionHelper(RetryingTransactionHelper service)
    • setValidAuthentictorKeys

      public void setValidAuthentictorKeys(Set<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 interface org.springframework.extensions.webscripts.servlet.ServletAuthenticatorFactory
      Overrides:
      create in class RemoteUserAuthenticatorFactory