Class PluginAuthenticatorRetVal

    • Constructor Detail

      • PluginAuthenticatorRetVal

        @Deprecated
        public PluginAuthenticatorRetVal​(org.pac4j.core.client.IndirectClient client)
        Deprecated.
        Since 7.2.0. Use newBuilder() instead.
        Creates a new return value with the given client.
        Parameters:
        client - The client that implements the user authentication.
    • Method Detail

      • getDirectClient

        public org.pac4j.core.client.DirectClient getDirectClient()
        Description copied from interface: IPluginFormAuthenticatorRetVal
        The direct client to be used for authentication. Direct clients generally bring authentication information with the request to a protected resource (i.e. as Request-Headers). If there is only one authenticator configured for a protected resource (e.g. a form) and this authenticator can produce a direct authenticator then the security logic with this client will be performed directly.
        Specified by:
        getDirectClient in interface IPluginFormAuthenticatorRetVal
        Returns:
        The DirectClient created by the plugin.
      • getIndirectClient

        public org.pac4j.core.client.IndirectClient getIndirectClient()
        Description copied from interface: IPluginFormAuthenticatorRetVal
        The indirect client to be used for authentication. Indirect clients work with an authorization flow that redirects the user to the IDP where they authenticate. The result of the authentication is then returned to the callback URL.
        Specified by:
        getIndirectClient in interface IPluginFormAuthenticatorRetVal
        Returns:
        The IndirectClient created by the plugin.
      • isIndirectClientSupportsDirectAuthentication

        public boolean isIndirectClientSupportsDirectAuthentication()
        Description copied from interface: IPluginFormAuthenticatorRetVal
        Determines whether or not the indirect client (i.e. IPluginFormAuthenticatorRetVal.getIndirectClient() should be handled as a direct client. This means that the security logic of the client should be performed directly if the authenticator is the only authenticator configured for a protected resource (see #getDirectClient()). If a direct client is given then the direct client will be tried first.
        Specified by:
        isIndirectClientSupportsDirectAuthentication in interface IPluginFormAuthenticatorRetVal
        Returns:
        true if the indirect client should be treated as a direct client in the security logic of a protected resource and false otherwise.