Class ParameterHelper


  • public final class ParameterHelper
    extends Object
    Access to passthrough definitions and the session payload captured on an initial form request.
    Since:
    8.6.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String PASSTHROUGH_PARAMETERS_KEY
      Session attribute containing captured parameters for the pending form login.
    • Field Detail

      • PASSTHROUGH_PARAMETERS_KEY

        public static final String PASSTHROUGH_PARAMETERS_KEY
        Session attribute containing captured parameters for the pending form login.
        See Also:
        Constant Field Values
    • Method Detail

      • readDefinitions

        public static List<ParameterDefinition> readDefinitions​(org.pac4j.core.client.Client client)
        Reads the definitions attached to a supported indirect client's redirect builder.
        Parameters:
        client - the client to inspect
        Returns:
        its passthrough definitions, or an empty list for other clients
      • saveParameters

        public static void saveParameters​(org.pac4j.core.context.session.SessionStore sessionStore,
                                          org.pac4j.core.context.WebContext webContext,
                                          ParameterStore passthroughParameters)
        Replaces the captured parameters for the pending form login.
        Parameters:
        sessionStore - the session store, or null when unavailable
        webContext - the current web context, or null when unavailable
        passthroughParameters - the replacement payload; an empty store clears previous values
      • readParameters

        public static ParameterStore readParameters​(org.pac4j.core.context.session.SessionStore sessionStore,
                                                    org.pac4j.core.context.WebContext webContext)
        Reads the captured parameters without consuming them.
        Parameters:
        sessionStore - the session store, or null when unavailable
        webContext - the current web context, or null when unavailable
        Returns:
        the payload, or null when none is available
      • clearParameters

        public static void clearParameters​(org.pac4j.core.context.session.SessionStore sessionStore,
                                           org.pac4j.core.context.WebContext webContext)
        Consumes the captured payload after a passthrough redirect has been constructed successfully.
        Parameters:
        sessionStore - the session store, or null when unavailable
        webContext - the current web context, or null when unavailable