Interface IFormAuthContext

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    FormAuthContext

    public interface IFormAuthContext
    extends Serializable
    Interface of an form based authentication context
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getAuthenticatorToken

        String getAuthenticatorToken()
        Get the token of the current IAuthenticator or the name of an internal authenticator
        Returns:
        String token or name
      • setAuthenticatorToken

        void setAuthenticatorToken​(String token)
        Set the token of the current IAuthenticator
        Parameters:
        token - The token of the current IAuthenticator or the name of an internal authenticator.
      • getClient

        Mandant getClient()
        Get the client to which the form belongs.
        Returns:
        The current Mandant to which the form belongs.
      • getBaseUrl

        String getBaseUrl()
        Get the current base URL
        Returns:
        String the base URL
      • getFRQSession

        FRQSession getFRQSession()
        Get the current form request session to authenticate with
        Returns:
        FRQSession to authenticate
      • getAuthConfig

        org.pac4j.core.config.Config getAuthConfig​(EAuthenticationFlow authFlow)
        Returns the current configuration of the authentication context for the given authentication flow. If no configuration is present, the configuration will be build and saved.
        Parameters:
        authFlow - the authentication flow for which to get the authentication configuration.
        Returns:
        The existing or newly created Config.
      • getClients

        List<org.pac4j.core.client.Client> getClients​(EAuthenticationFlow authFlow)
        Returns an ordered list of the clients for the given authentication flow. If the clients have not been created for the given authentication flow they will be created.
        Parameters:
        authFlow - The authentication flow for which to get the clients.
        Returns:
        An ordered list of the clients for the given authentication flow.
      • getLocale

        Locale getLocale()
        Returns the locale of the auth context
        Returns:
        Locale
      • getRequest

        javax.servlet.http.HttpServletRequest getRequest()
        Returns the HTTP servlet request
        Returns:
        HttpServletRequest
      • getResponse

        javax.servlet.http.HttpServletResponse getResponse()
        Returns the HTTP servlet response
        Returns:
        HttpServletResponse
      • checkAuthorisation

        boolean checkAuthorisation​(org.pac4j.core.profile.CommonProfile profile)
        Checks the authorization of the given profiles against the current context
        Parameters:
        profile - A CommonProfile to check
        Returns:
        true if authorized, or false otherwise.
      • login

        void login​(javax.servlet.FilterChain chain,
                   EAuthenticationFlow authFlow)
        Starts the login logic for the given authentication flow.
        Parameters:
        authFlow - the authentication flow for which to perform the authorization flow.
        chain - FilterChain to process after the authorization
      • logout

        void logout()
        Starts the logout from the given authorizations.
      • logout

        void logout​(javax.servlet.FilterChain chain)
             throws IOException,
                    javax.servlet.ServletException
        Starts the logout from the given authorizations
        Parameters:
        chain - FilterChain to process after the logout
        Throws:
        IOException - IO-errors while processing the chain
        javax.servlet.ServletException - Servlet-errors while processing the chain
      • callback

        void callback()
        Starts the callback handling of the current context.
      • getAuthConfig

        @Deprecated
        default org.pac4j.core.config.Config getAuthConfig()
        Deprecated.
        Since 7.2.0. Use getAuthConfig(EAuthenticationFlow) instead.
        Returns the current configuration of the authentication context. If no configuration is present, the configuration will be build and saved.
        Returns:
        The existing or newly created Config.
      • authorize

        @Deprecated
        default void authorize​(javax.servlet.FilterChain chain)
        Deprecated.
        Since 7.2.0. Use login(FilterChain, EAuthenticationFlow) instead.
        Starts the authorization flow of the current context
        Parameters:
        chain - FilterChain to process after the authorization