Spring Security Custom User Detail Service
Jump to navigation
Jump to search
Internal
Overview
This approach is useful for the situation in which the user information should be part of the application's domain model.
Combining application authentication and authorization with domain model user information largely consists in the following steps:
- Declare a User entity that should implement the Spring UserDetails interface. Implementation of UserDetails provides essential user information to the framework, in a standard fashion (whether the account is enabled or not, authorities, etc.). Implementing UserInterface on a generic user domain model entity is the programmatic way of modifying the generic user entity to make it useful for authentication.