Curious users may wonder if 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:
- First, we can add additional methods to the rememberMe method, as follows:
//src/main/java/com/packtpub/springsecurity/configuration/
SecurityConfig.java
http.rememberMe()
.key("jbcpCalendar")
.rememberMeParameter("jbcpCalendar-remember-me")
.rememberMeCookieName("jbcpCalendar-remember-me");
- Additionally, now that we've declared our own RememberMeServices implementation as a Spring bean, we can simply define more properties to change the checkbox and cookie names...