Custom cookie and HTTP parameter names
Curious users may wonder whether the expected value of the remember-me form field checkbox to be remember-me, or the cookie name to be remember-me, can be changed to obscure the use of Spring Security. This change can be made in one of two locations. Take a look at the following steps:
- We can simply define more properties to change the checkbox and cookie names in
RememberMeServices
bean
, as follows://src/main/java/com/packtpub/springsecurity/configuration/ SecurityConfig.java @Bean public RememberMeServices rememberMeServices(PersistentTokenRepository ptr, UserDetailsService userDetailsService) { PersistentTokenBasedRememberMeServices rememberMeServices = new PersistentTokenBasedRememberMeServices("jbcpCalendar", userDetailsService, ptr); rememberMeServices.setAlwaysRemember...