Class DefaultOAuth2UserDetailsService
java.lang.Object
com.broadleafcommerce.auth.user.service.DefaultOAuth2UserDetailsService
- All Implemented Interfaces:
OAuth2UserDetailsService
An
OAuth2UserDetailsService implementation that uses the UserService for loading
users by clientId and username.- Author:
- Nathan Moore (nathanmoore), Phillip Verheyden (phillipuniverse), Nick Crum (ncrum)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultOAuth2UserDetailsService(UserService<User> userService, AuthorizedClientService<AuthorizedClient> clientService, PrivilegeService privilegeService) -
Method Summary
Modifier and TypeMethodDescriptionprotected OAuth2UserDetailsbuildUserDetails(User user, String clientId, String serverId) protected org.springframework.security.core.GrantedAuthoritycreateAuthority(String raw) protected Set<org.springframework.security.core.GrantedAuthority>createGrantedAuthoritiesFromPermissionNames(Set<String> permissionNames) protected StringfindServerIdForClient(String clientId) protected AuthorizedClientService<AuthorizedClient>protected PrivilegeServiceprotected UserService<User>loadAnonymousCsrUser(String clientId) loadCsrUser(String clientId, String csrId) loadUserByClientIdAndUsername(String clientId, String username) booleanusernameExists(String clientId, String username)
-
Constructor Details
-
DefaultOAuth2UserDetailsService
public DefaultOAuth2UserDetailsService(UserService<User> userService, AuthorizedClientService<AuthorizedClient> clientService, PrivilegeService privilegeService)
-
-
Method Details
-
usernameExists
- Specified by:
usernameExistsin interfaceOAuth2UserDetailsService
-
loadUserByClientIdAndUsername
@Transactional(readOnly=true) public OAuth2UserDetails loadUserByClientIdAndUsername(String clientId, String username) - Specified by:
loadUserByClientIdAndUsernamein interfaceOAuth2UserDetailsService
-
loadAnonymousCsrUser
- Specified by:
loadAnonymousCsrUserin interfaceOAuth2UserDetailsService
-
loadCsrUser
- Specified by:
loadCsrUserin interfaceOAuth2UserDetailsService
-
findServerIdForClient
-
buildUserDetails
-
createGrantedAuthoritiesFromPermissionNames
-
createAuthority
-
getUserService
-
getClientService
-
getPrivilegeService
-