Package org.pac4j.core.engine.decision
Class DefaultProfileStorageDecision<C extends WebContext>
- java.lang.Object
-
- org.pac4j.core.engine.decision.DefaultProfileStorageDecision<C>
-
- 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 Summary
Constructors Constructor Description DefaultProfileStorageDecision()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
mustSaveProfileInSession(C context, List<Client> currentClients, DirectClient directClient, UserProfile profile)
Never save the profile in session after a direct client authentication.
-
-
-
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 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)
Never save the profile in session after a direct client authentication.- 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:
false
-
-