Class DefaultProfileStorageDecision<C extends WebContext>

  • All Implemented Interfaces:
    ProfileStorageDecision<C>

    public class DefaultProfileStorageDecision<C extends WebContext>
    extends Object
    implements ProfileStorageDecision<C>
    Default decision class where the indirect clients are handled separately from the direct clients.
    Since:
    3.0.0
    Author:
    Jerome Leleu
    • Constructor Detail

      • DefaultProfileStorageDecision

        public DefaultProfileStorageDecision()
    • Method Detail

      • mustLoadProfilesFromSession

        public boolean mustLoadProfilesFromSession​(C context,
                                                   List<Client> currentClients)
        Load the profiles from the web session if no clients are defined or if the first client is an indirect one or if the first client is the anonymous one.
        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)
        Never save the profile in session after a direct client authentication.
        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:
        false