Class AadResourceServerConfiguration
java.lang.Object
com.azure.spring.cloud.autoconfigure.aad.configuration.AadResourceServerConfiguration
@Configuration(proxyBeanMethods=false)
@Conditional(com.azure.spring.cloud.autoconfigure.aad.implementation.conditions.ResourceServerCondition.class)
public class AadResourceServerConfiguration
extends Object
The configuration will not be activated if no BearerTokenAuthenticationToken
class provided.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Default configuration class for using AAD authentication and authorization. -
Constructor Summary
ConstructorDescriptionAadResourceServerConfiguration
(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) Creates a new instance ofAadResourceServerConfiguration
. -
Method Summary
Modifier and TypeMethodDescriptionList<org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>>
createDefaultValidator
(AadAuthenticationProperties aadAuthenticationProperties) Creates a default validator.org.springframework.security.oauth2.jwt.JwtDecoder
jwtDecoder
(AadAuthenticationProperties aadAuthenticationProperties) Use JwkKeySetUri to create JwtDecoder
-
Constructor Details
-
AadResourceServerConfiguration
public AadResourceServerConfiguration(org.springframework.boot.web.client.RestTemplateBuilder restTemplateBuilder) Creates a new instance ofAadResourceServerConfiguration
.- Parameters:
restTemplateBuilder
- the RestTemplateBuilder
-
-
Method Details
-
jwtDecoder
@Bean @ConditionalOnMissingBean(org.springframework.security.oauth2.jwt.JwtDecoder.class) public org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder(AadAuthenticationProperties aadAuthenticationProperties) Use JwkKeySetUri to create JwtDecoder- Parameters:
aadAuthenticationProperties
- the AAD properties- Returns:
- Get the jwtDecoder instance
-
createDefaultValidator
public List<org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>> createDefaultValidator(AadAuthenticationProperties aadAuthenticationProperties) Creates a default validator.- Parameters:
aadAuthenticationProperties
- the AAD properties- Returns:
- a default validator
-