UserDetails is the Spring Security contract that lets a user object provide credentials, granted authorities, and account-status information to the framework. section 5.2.2
A UserDetails implementation supplies:
- getAuthorities(), which returns the user's granted authorities. section 5.2.2
- isEnabled(), isAccountNonLocked(), and related methods, which report whether the account remains active. section 5.2.2
- Credentials and profile data, allowing one application entity to support authentication and application needs. section 5.2.2
A database-backed user
A Taco Cloud User entity implements UserDetails, returns ROLE_USER from getAuthorities(), and currently returns true from its account-status methods. A custom UserDetailsService finds that entity by username and returns it to Spring Security. section 5.2.2

