Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Security

You're reading from   Spring Security Secure your web applications, RESTful services, and microservice architectures

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781787129511
Length 542 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Robert Winch Robert Winch
Author Profile Icon Robert Winch
Robert Winch
Peter Mularien Peter Mularien
Author Profile Icon Peter Mularien
Peter Mularien
Mick Knutson Mick Knutson
Author Profile Icon Mick Knutson
Mick Knutson
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Anatomy of an Unsafe Application FREE CHAPTER 2. Getting Started with Spring Security 3. Custom Authentication 4. JDBC-Based Authentication 5. Authentication with Spring Data 6. LDAP Directory Services 7. Remember-Me Services 8. Client Certificate Authentication with TLS 9. Opening up to OAuth 2 10. Single Sign-On with the Central Authentication Service 11. Fine-Grained Access Control 12. Access Control Lists 13. Custom Authorization 14. Session Management 15. Additional Spring Security Features 16. Migration to Spring Security 4.2 17. Microservice Security with OAuth 2 and JSON Web Tokens 18. Additional Reference Material

Custom cookie and HTTP parameter names

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:

  1. 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");
  1. 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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime