public interface SecurityStoreDelegate extends Serializable
To integrate SpringSecurity with ApiBoot, you need to query the agent class of
Use UserDetails by defaultDefaultSecurityStoreDelegate
| 限定符和类型 | 方法和说明 |
|---|---|
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String username)
Query user
Users use to authenticate SpringSecurity
When we use JDBC to store users, we need to query
UserDetails from the database according to the UserDetails.getUsername()
If oauth2 is integrated, it corresponds to the UserDetails.getUsername() and UserDetails.getPassword()
of "grant_type=password" authorization mode
It should be noted that:
do not use this method in memory mode |
org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
Users use to authenticate SpringSecurity
When we use JDBC to store users, we need to query UserDetails from the database according to the UserDetails.getUsername()
If oauth2 is integrated, it corresponds to the UserDetails.getUsername() and UserDetails.getPassword()
of "grant_type=password" authorization mode
It should be noted that: do not use this method in memory mode
username - UserDetails.getUsername()UserDetailsorg.springframework.security.core.userdetails.UsernameNotFoundException - Throw this exception if the user does not existCopyright © 2020. All rights reserved.