Interface AuthenticationInfoPostProcessor


  • @ConsumerType
    public interface AuthenticationInfoPostProcessor
    Service interface which allows bundles to modify the AuthenticationInfo object right after one AuthenticationHandler has returned an {AuthenticationInfo from the AuthenticationHandler.extractCredentials(HttpServletRequest, HttpServletResponse) method or an anonymous AuthenticationInfo has been created. This service is called before the ResourceResolver is created and any login into the resource providers (such as a JCR repository or other data store) happens. However, the AuthenticationHandler might actually do such a login and pass on the information to the resource provider through the AuthenticationInfo. This service interface is useful to access and modify the {AuthenticationInfo before it is passed to the ResourceResolverFactory to create a ResourceResolver.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String SERVICE_NAME
      The name under which an implementation of this interface must be registered to be used as an authentication info post processor.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void postProcess​(AuthenticationInfo info, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Perform some post-processing on the AuthenticationInfo object.
    • Field Detail

      • SERVICE_NAME

        static final String SERVICE_NAME
        The name under which an implementation of this interface must be registered to be used as an authentication info post processor.
        See Also:
        Constant Field Values
    • Method Detail

      • postProcess

        void postProcess​(AuthenticationInfo info,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws org.apache.sling.api.resource.LoginException
        Perform some post-processing on the AuthenticationInfo object.
        Parameters:
        info - The authentication info
        request - The current request
        response - The current response
        Throws:
        org.apache.sling.api.resource.LoginException - if SlingAuthenticator should handle the exception (eg. set the correct status in the response) SlingException will not be caught by SlingAuthenticator, in this case the method has to set the accurate status in the response
        org.apache.sling.api.SlingException - may be thrown to convey any problem while handling the credentials