Class AadOAuth2ClientConfiguration

java.lang.Object
com.azure.spring.cloud.autoconfigure.aad.configuration.AadOAuth2ClientConfiguration

@Configuration(proxyBeanMethods=false) @Conditional(com.azure.spring.cloud.autoconfigure.aad.implementation.conditions.ClientRegistrationCondition.class) public class AadOAuth2ClientConfiguration extends Object

The configuration will not be activated if no ClientRegistration classes provided.

  • Constructor Details

    • AadOAuth2ClientConfiguration

      public AadOAuth2ClientConfiguration(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
      Creates a new instance of AadOAuth2ClientConfiguration.
      Parameters:
      restTemplateBuilder - the RestTemplateBuilder
  • Method Details

    • clientRegistrationRepository

      @Bean @ConditionalOnMissingBean public org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository(AadAuthenticationProperties properties)
      Declare ClientRegistrationRepository bean.
      Parameters:
      properties - the AAD authentication properties
      Returns:
      ClientRegistrationRepository bean
    • oAuth2AuthorizedClientRepository

      @Bean @ConditionalOnMissingBean public org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository oAuth2AuthorizedClientRepository()
      Declare OAuth2AuthorizedClientRepository bean.
      Returns:
      OAuth2AuthorizedClientRepository bean