@Configuration
@ConditionalOnResource(resources="classpath:aad.enable.config")
@ConditionalOnWebApplication(type=SERVLET)
@ConditionalOnProperty(prefix="azure.activedirectory",
value="tenant-id")
@PropertySource(value="classpath:/aad-oauth2-common.properties") @PropertySource(value="classpath:serviceEndpoints.properties")
@EnableConfigurationProperties(value={AADAuthenticationProperties.class,ServiceEndpointsProperties.class})
public class AADOAuth2AutoConfiguration
extends Object
Auto-configuration for Azure Active Authentication OAuth 2.0.
The configuration will not be activated if no azure.activedirectory.tenant-id property provided.
A OAuth2 user service AADOAuth2UserService will be auto-configured by specifying
azure.activedirectory.user-group.allowed-groups property.
| Constructor and Description |
|---|
AADOAuth2AutoConfiguration(AADAuthenticationProperties aadAuthProperties,
ServiceEndpointsProperties serviceEndpointsProps) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.OidcUser> |
oidcUserService() |
public AADOAuth2AutoConfiguration(AADAuthenticationProperties aadAuthProperties, ServiceEndpointsProperties serviceEndpointsProps)
@Bean
@ConditionalOnProperty(prefix="azure.activedirectory.user-group",
value="allowed-groups")
public org.springframework.security.oauth2.client.userinfo.OAuth2UserService<org.springframework.security.oauth2.client.oidc.userinfo.OidcUserRequest,org.springframework.security.oauth2.core.oidc.user.OidcUser> oidcUserService()
Copyright © 2020 Microsoft Corporation. All rights reserved.