How it works...

This recipe opens other options of storing and managing user information and credentials aside from the in-memory or hardcoding way. This is the most appropriate way to manage user details and authorities through the use of the UserDetailsService interface, which injects UserDetails into the SecurityContext. The UserDetailsService is an interface used in building the user account through the user's username, password, and GrantedAuthorities. It has a required loadUserByUsername() method which asks for the username of the user to build and inject into the container an object called UserDetails. This UserDetails is another interface that holds the user information, which is later encapsulated into authentication objects found in filters, providers, and handlers. A default implementation of this interface is org.springframework.security.core.userdetails.User, which is capable of saving the username, password, and granted authorities together with some toggle values as to whether the object is lockable and/or within expiration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.15.161