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 Details

    • AadB2cOAuth2ClientConfiguration

      public AadB2cOAuth2ClientConfiguration(AadB2cProperties properties, org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
      Creates a new instance of AadB2cOAuth2ClientConfiguration.
      Parameters:
      properties - the AAD B2C properties
      restTemplateBuilder - 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 repository
      authorizedClients - the OAuth2 authorized client repository
      Returns:
      OAuth2AuthorizedClientManager bean