Class AlwaysUseSessionProfileStorageDecision<C extends WebContext>

  • All Implemented Interfaces:
    ProfileStorageDecision<C>

    public class AlwaysUseSessionProfileStorageDecision<C extends WebContext>
    extends Object
    implements ProfileStorageDecision<C>
    A decision class where the session is always used, generally when indirect and direct clients are mixed in the same web application.
    Since:
    3.0.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • AlwaysUseSessionProfileStorageDecision

        public AlwaysUseSessionProfileStorageDecision()
    • Method Detail

      • mustLoadProfilesFromSession

        public boolean mustLoadProfilesFromSession​(C context,
                                                   List<Client> currentClients)
        Description copied from interface: ProfileStorageDecision
        Whether we must load the profiles from the web session.
        Specified by:
        mustLoadProfilesFromSession in interface ProfileStorageDecision<C extends WebContext>
        Parameters:
        context - the web context
        currentClients - the current clients
        Returns:
        whether the profiles must be loaded from the web session
      • mustSaveProfileInSession

        public boolean mustSaveProfileInSession​(C context,
                                                List<Client> currentClients,
                                                DirectClient directClient,
                                                UserProfile profile)
        Description copied from interface: ProfileStorageDecision
        Whether we must save the profile in session after the authentication of direct clients.
        Specified by:
        mustSaveProfileInSession in interface ProfileStorageDecision<C extends WebContext>
        Parameters:
        context - the web context
        currentClients - the current clients
        directClient - the direct clients
        profile - the retrieved profile after login
        Returns:
        whether we must save the profile in session