public class DefaultOAuth2UserDetailsService extends Object implements OAuth2UserDetailsService
OAuth2UserDetailsService
implementation that uses the UserService
for loading
users by clientId and username.Constructor and Description |
---|
DefaultOAuth2UserDetailsService(UserService<User> userService,
AuthorizedClientService<AuthorizedClient> clientService,
PrivilegeService privilegeService) |
Modifier and Type | Method and Description |
---|---|
protected OAuth2UserDetails |
buildUserDetails(User user,
String clientId,
String serverId) |
protected org.springframework.security.core.GrantedAuthority |
createAuthority(String raw) |
protected Set<org.springframework.security.core.GrantedAuthority> |
createGrantedAuthoritiesFromPermissionNames(Set<String> permissionNames) |
protected String |
findServerIdForClient(String clientId) |
OAuth2UserDetails |
loadAnonymousCsrUser(String clientId) |
OAuth2UserDetails |
loadUserByClientIdAndUsername(String clientId,
String username) |
boolean |
usernameExists(String clientId,
String username) |
public DefaultOAuth2UserDetailsService(UserService<User> userService, AuthorizedClientService<AuthorizedClient> clientService, PrivilegeService privilegeService)
@Transactional(readOnly=true) public boolean usernameExists(String clientId, String username)
usernameExists
in interface OAuth2UserDetailsService
@Transactional(readOnly=true) public OAuth2UserDetails loadUserByClientIdAndUsername(String clientId, String username)
loadUserByClientIdAndUsername
in interface OAuth2UserDetailsService
public OAuth2UserDetails loadAnonymousCsrUser(String clientId)
loadAnonymousCsrUser
in interface OAuth2UserDetailsService
protected OAuth2UserDetails buildUserDetails(User user, String clientId, String serverId)
protected Set<org.springframework.security.core.GrantedAuthority> createGrantedAuthoritiesFromPermissionNames(Set<String> permissionNames)
protected org.springframework.security.core.GrantedAuthority createAuthority(String raw)
Copyright © 2021. All rights reserved.