Class SessionManagementConfigurer
java.lang.Object
com.codename1.backend.security.SecurityConfigurer
com.codename1.backend.security.SessionManagementConfigurer
Whether a chain uses the HTTP session, and what happens to it at sign-in.
http.sessionManagement(session ->
session.sessionCreationPolicy(SessionCreationPolicy.STATELESS));
http.sessionManagement(session -> session.maximumSessions(1).expiredUrl("/login?expired"));
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionfinal classThe choices that followmaximumSessions.final classThe choices forsessionFixation(Customizer). -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(HttpSecurity http) Adds this part's filters; nothing by default.maximumSessions(int maximumSessions) How many sessions one user may be signed in on at once; unlimited unless set.SeeSessionCreationPolicy;IF_REQUIREDunless set.sessionFixation(Customizer<SessionManagementConfigurer.SessionFixationConfigurer> sessionFixationCustomizer) What protects a sign-in from a session id planted on the client beforehand; the id is changed unless set otherwise.Methods inherited from class SecurityConfigurer
disable, getBuilder, init
-
Method Details
-
sessionCreationPolicy
SeeSessionCreationPolicy;IF_REQUIREDunless set. -
sessionFixation
public SessionManagementConfigurer sessionFixation(Customizer<SessionManagementConfigurer.SessionFixationConfigurer> sessionFixationCustomizer) What protects a sign-in from a session id planted on the client beforehand; the id is changed unless set otherwise. -
maximumSessions
public SessionManagementConfigurer.ConcurrencyControlConfigurer maximumSessions(int maximumSessions) How many sessions one user may be signed in on at once; unlimited unless set. A sign-in past the limit expires that user's least recently used session, whose next request is signed out -- unlessSessionManagementConfigurer.ConcurrencyControlConfigurer.maxSessionsPreventsLogin(boolean)refuses the new sign-in instead. -
configure
Description copied from class:SecurityConfigurerAdds this part's filters; nothing by default.- Overrides:
configurein classSecurityConfigurer
-