Package org.pac4j.core.engine.decision
Class AlwaysUseSessionProfileStorageDecision<C extends WebContext>
- java.lang.Object
-
- org.pac4j.core.engine.decision.AlwaysUseSessionProfileStorageDecision<C>
-
- 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 Summary
Constructors Constructor Description AlwaysUseSessionProfileStorageDecision()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
mustLoadProfilesFromSession(C context, List<Client> currentClients)
Whether we must load the profiles from the web session.boolean
mustSaveProfileInSession(C context, List<Client> currentClients, DirectClient directClient, UserProfile profile)
Whether we must save the profile in session after the authentication of direct clients.
-
-
-
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 interfaceProfileStorageDecision<C extends WebContext>
- Parameters:
context
- the web contextcurrentClients
- 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 interfaceProfileStorageDecision<C extends WebContext>
- Parameters:
context
- the web contextcurrentClients
- the current clientsdirectClient
- the direct clientsprofile
- the retrieved profile after login- Returns:
- whether we must save the profile in session
-
-