Class AadB2cOAuth2ClientConfiguration
java.lang.Object
com.azure.spring.cloud.autoconfigure.aadb2c.configuration.AadB2cOAuth2ClientConfiguration
@Configuration(proxyBeanMethods=false)
@ConditionalOnProperty(value="spring.cloud.azure.active-directory.b2c.enabled",
havingValue="true")
@Conditional(com.azure.spring.cloud.autoconfigure.aadb2c.implementation.AadB2cConditions.ClientRegistrationCondition.class)
@Import(AadB2cPropertiesConfiguration.class)
@ConditionalOnClass(org.springframework.security.oauth2.client.web.OAuth2LoginAuthenticationFilter.class)
public class AadB2cOAuth2ClientConfiguration
extends Object
Configuration for AAD B2C OAuth2 client support, when depends on the Spring OAuth2 Client module.
-
Constructor Summary
ConstructorDescriptionAadB2cOAuth2ClientConfiguration
(AadB2cProperties properties, org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) Creates a new instance ofAadB2cOAuth2ClientConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.client.OAuth2AuthorizedClientManager
authorizedClientManager
(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clients, org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository authorizedClients) Declare OAuth2AuthorizedClientManager bean.org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
Declare ClientRegistrationRepository bean.
-
Constructor Details
-
AadB2cOAuth2ClientConfiguration
public AadB2cOAuth2ClientConfiguration(AadB2cProperties properties, org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) Creates a new instance ofAadB2cOAuth2ClientConfiguration
.- Parameters:
properties
- the AAD B2C propertiesrestTemplateBuilder
- the restTemplateBuilder
-
-
Method Details
-
clientRegistrationRepository
@Bean @ConditionalOnMissingBean public org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository()Declare ClientRegistrationRepository bean.- Returns:
- ClientRegistrationRepository bean
-
authorizedClientManager
@Bean @ConditionalOnMissingBean public org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager authorizedClientManager(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clients, org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository authorizedClients) Declare OAuth2AuthorizedClientManager bean.- Parameters:
clients
- the client registration repositoryauthorizedClients
- the OAuth2 authorized client repository- Returns:
- OAuth2AuthorizedClientManager bean
-