Posts

Showing posts with the label remember me

How to disable soft login in Hybris?

How to disable remember-me login in SAP Hybris?
Requirement: Every time request timeout, the user should ask for login. There shouldn't be soft login or remember me option. Hybris OOTB behavior: In the B2B site, by default soft login is enabled. Means, users will be always auto login even session expired. Changes Required: Remove default remember me (soft login) behaviourRemove remember me references
1. Remove default remember me (soft login) behaviour Find filespring-security-config.xml located in your storefront extension. Look for beandefaultRememberMeServices definition, in which attributealwaysRemember has valuetrue, that needs to be changed to false. <alias name="defaultRememberMeServices" alias="rememberMeServices"/> <bean id="defaultRememberMeServices" class="com.mysite.storefront.security.AcceleratorRememberMeServices" > <property name="userDetailsService" ref="originalUidUserDetailsService" /> …

How to enable Remember me functionality in SAP Hybris?

Requirement: While login, the user should have the option (remember mecheckbox). If the user has selected checkbox, he/she should not ask to login again till remember me cookie expired. Hybris OOTB behaviour: In the B2B site, there no remembers me checkbox, by default internally it's always selected. Means, soft login will work for all users. But Hybris also has a concept,Hard Login which matches secure GUID stored in session and cookie for all secured URL having the @RequireHardLogInannotation. Changes Required: Remove default remember me (soft login) behaviourAdd remember me checkbox in the login pageChange Hard login behaviour, to regenerate GUID if auto-login perform for the current request.
1. Remove default remember me (soft login) behaviour Find filespring-security-config.xml located in your storefront extension. Look for beandefaultRememberMeServices definition, in which attributealwaysRemember has valuetrue, that needs to be changed to