Package com.azure.spring.aad.webapp
Class AADOAuth2UserService
- java.lang.Object
-
- com.azure.spring.aad.webapp.AADOAuth2UserService
-
- All Implemented Interfaces:
org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.OidcUser>
public class AADOAuth2UserService extends Object implements org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.OidcUser>
This implementation will retrieve group info of user from Microsoft Graph. Then map group toGrantedAuthority.
-
-
Constructor Summary
Constructors Constructor Description AADOAuth2UserService(AADAuthenticationProperties properties)Creates a new instance ofAADOAuth2UserService.AADOAuth2UserService(AADAuthenticationProperties properties, GraphClient graphClient)Creates a new instance ofAADOAuth2UserService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.oauth2.core.oidc.user.OidcUserloadUser(org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest userRequest)
-
-
-
Constructor Detail
-
AADOAuth2UserService
public AADOAuth2UserService(AADAuthenticationProperties properties)
Creates a new instance ofAADOAuth2UserService.- Parameters:
properties- the AAD authentication properties
-
AADOAuth2UserService
public AADOAuth2UserService(AADAuthenticationProperties properties, GraphClient graphClient)
Creates a new instance ofAADOAuth2UserService.- Parameters:
properties- the AAD authentication propertiesgraphClient- the graph client
-
-
Method Detail
-
loadUser
public org.springframework.security.oauth2.core.oidc.user.OidcUser loadUser(org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest userRequest) throws org.springframework.security.oauth2.core.OAuth2AuthenticationException- Specified by:
loadUserin interfaceorg.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.OidcUser>- Throws:
org.springframework.security.oauth2.core.OAuth2AuthenticationException
-
-