public class HybrisSessionFixationProtectionStrategy
extends SessionFixationProtectionStrategy
<security:http ...
<security:session-management session-authentication-strategy-ref="fixation"/>
</security:http>
<bean id="fixation" class="de.hybris.platform.servicelayer.security.spring.HybrisSessionFixationProtectionStrategy"/>
.. will enable this feature for your cockpit based frontend.| Constructor and Description |
|---|
HybrisSessionFixationProtectionStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected HttpSession |
createNewSessionAndMigrate(HttpServletRequest request,
java.lang.String originalSessionId,
java.util.Map<java.lang.String,java.lang.Object> attributesToMigrate) |
protected java.util.Map<java.lang.String,java.lang.Object> |
getAttributesAndinvalidateOldSession(HttpSession originalSession) |
protected boolean |
keyCanBeMigrated(java.lang.String key) |
void |
onAuthentication(Authentication authentication,
HttpServletRequest request,
HttpServletResponse response)
Called when a user is newly authenticated.
|
void |
setMigrateSessionAttributes(boolean migrateSessionAttributes) |
public HybrisSessionFixationProtectionStrategy()
public void onAuthentication(Authentication authentication,
HttpServletRequest request,
HttpServletResponse response)
If a session already exists, a new session will be created, the session attributes copied to it (if migrateSessionAttributes is set) and the sessionRegistry updated with the new session information.
If there is no session, no action is taken unless the alwaysCreateSession property is set, in which case a session will be created if one doesn't already exist.
protected HttpSession createNewSessionAndMigrate(HttpServletRequest request,
java.lang.String originalSessionId,
java.util.Map<java.lang.String,java.lang.Object> attributesToMigrate)
protected java.util.Map<java.lang.String,java.lang.Object> getAttributesAndinvalidateOldSession(HttpSession originalSession)
protected boolean keyCanBeMigrated(java.lang.String key)
public void setMigrateSessionAttributes(boolean migrateSessionAttributes)
Copyright © 2018 SAP SE. All Rights Reserved.