Reputation: 9639
Is it possible via configuration to change the default name of the the remember me cookie ?
By default the cookie name is: SPRING_SECURITY_REMEMBER_ME_COOKIE
and I would like to have a less obvious cookie name.
Upvotes: 1
Views: 1705
Reputation: 1
For Spring Security 4 , the below works .
<remember-me
key="<yourKey>"
remember-me-parameter="remember-me"
token-validity-seconds="1209600"
user-service-ref="userDetailsService"
remember-me-cookie="<whateveryouwanttonamethecookie>"
/>
Upvotes: 0
Reputation: 47290
<bean id="rememberMeServices" class="org.springframework.security.ui.rememberme.TokenBasedRememberMeServices">
<property name="userDetailsService" ref="userService"/>
<property name="key" value="remember-me-security"/>
<property name="cookieName" value="remember_me_cookie" />
</bean>
Upvotes: 1