Class AadB2cResourceServerAutoConfiguration

java.lang.Object
com.azure.spring.cloud.autoconfigure.aadb2c.AadB2cResourceServerAutoConfiguration

@Configuration(proxyBeanMethods=false) @ConditionalOnWebApplication(type=SERVLET) @ConditionalOnProperty(value="spring.cloud.azure.active-directory.b2c.enabled", havingValue="true") @ConditionalOnClass(org.springframework.security.oauth2.server.resource.authentication.BearerTokenAuthenticationToken.class) @Import({AadB2cPropertiesConfiguration.class,AadB2cOAuth2ClientConfiguration.class}) public class AadB2cResourceServerAutoConfiguration extends Object
Configure necessary beans for Azure AD B2C resource server beans, and import AadB2cOAuth2ClientConfiguration class for Azure AD B2C OAuth2 client support.
  • Constructor Details

    • AadB2cResourceServerAutoConfiguration

      public AadB2cResourceServerAutoConfiguration(AadB2cProperties properties, org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder)
      Creates a new instance of AadB2cResourceServerAutoConfiguration.
      Parameters:
      properties - the Azure AD B2C properties
      restTemplateBuilder - the restTemplateBuilder
  • Method Details

    • trustedIssuerRepository

      @Bean @ConditionalOnMissingBean public AadTrustedIssuerRepository trustedIssuerRepository()
      Declare AADTrustedIssuerRepository bean.
      Returns:
      AADTrustedIssuerRepository bean
    • jwtResourceRetriever

      @Bean @ConditionalOnMissingBean(com.nimbusds.jose.util.ResourceRetriever.class) public com.nimbusds.jose.util.ResourceRetriever jwtResourceRetriever()
      Declare JWT ResourceRetriever bean.
      Returns:
      JWT ResourceRetriever bean
    • aadIssuerJwsKeySelector

      @Bean @ConditionalOnMissingBean public com.nimbusds.jwt.proc.JWTClaimsSetAwareJWSKeySelector<com.nimbusds.jose.proc.SecurityContext> aadIssuerJwsKeySelector(AadTrustedIssuerRepository aadTrustedIssuerRepository, com.nimbusds.jose.util.ResourceRetriever resourceRetriever)
      Declare JWTClaimsSetAwareJWSKeySelector bean.
      Parameters:
      aadTrustedIssuerRepository - the AAD trusted issuer repository
      resourceRetriever - the resource retriever
      Returns:
      JWTClaimsSetAwareJWSKeySelector bean
    • jwtProcessor

      @Bean @ConditionalOnMissingBean public com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor(com.nimbusds.jwt.proc.JWTClaimsSetAwareJWSKeySelector<com.nimbusds.jose.proc.SecurityContext> keySelector)
      Declare JWTProcessor bean.
      Parameters:
      keySelector - the JWT claims set aware JWS key selector
      Returns:
      JWTProcessor bean
    • jwtDecoder

      @Bean @ConditionalOnMissingBean public org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder(com.nimbusds.jwt.proc.JWTProcessor<com.nimbusds.jose.proc.SecurityContext> jwtProcessor, AadTrustedIssuerRepository trustedIssuerRepository)
      Declare JwtDecoder bean.
      Parameters:
      jwtProcessor - the JWT processor
      trustedIssuerRepository - the AAD trusted issuer repository
      Returns:
      JwtDecoder bean