Class AadJwtBearerTokenAuthenticationConverter
java.lang.Object
com.azure.spring.cloud.autoconfigure.aad.AadJwtBearerTokenAuthenticationConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
@Deprecated
public class AadJwtBearerTokenAuthenticationConverter
extends Object
implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
Deprecated.
A
Converter that takes a Jwt and converts it into a BearerTokenAuthentication.-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Construct AADJwtBearerTokenAuthenticationConverter by AADTokenClaim.SUB and DEFAULT_CLAIM_TO_AUTHORITY_PREFIX_MAP.AadJwtBearerTokenAuthenticationConverter(String authoritiesClaimName) Deprecated.Construct AADJwtBearerTokenAuthenticationConverter with the authority claim.AadJwtBearerTokenAuthenticationConverter(String authoritiesClaimName, String authorityPrefix) Deprecated.Construct AADJwtBearerTokenAuthenticationConverter with the authority claim name and prefix.AadJwtBearerTokenAuthenticationConverter(String principalClaimName, Map<String, String> claimToAuthorityPrefixMap) Deprecated.Using spring security provides JwtGrantedAuthoritiesConverter, it can resolve the access token of scp or roles.AadJwtBearerTokenAuthenticationConverter(String principalClaimName, org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt, Collection<org.springframework.security.core.GrantedAuthority>> jwtGrantedAuthoritiesConverter) Deprecated.Using the principal claim name and the custom JwtGrantedAuthoritiesConverter.AadJwtBearerTokenAuthenticationConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt, Collection<org.springframework.security.core.GrantedAuthority>> jwtGrantedAuthoritiesConverter) Deprecated.Using the custom JwtGrantedAuthoritiesConverter. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.authentication.AbstractAuthenticationTokenconvert(org.springframework.security.oauth2.jwt.Jwt jwt) Deprecated.Convert the source object of typeJwtto target typeAbstractAuthenticationToken.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Constructor Details
-
AadJwtBearerTokenAuthenticationConverter
public AadJwtBearerTokenAuthenticationConverter()Deprecated.Construct AADJwtBearerTokenAuthenticationConverter by AADTokenClaim.SUB and DEFAULT_CLAIM_TO_AUTHORITY_PREFIX_MAP. -
AadJwtBearerTokenAuthenticationConverter
Deprecated.Construct AADJwtBearerTokenAuthenticationConverter with the authority claim.- Parameters:
authoritiesClaimName- authority claim name
-
AadJwtBearerTokenAuthenticationConverter
public AadJwtBearerTokenAuthenticationConverter(String authoritiesClaimName, String authorityPrefix) Deprecated.Construct AADJwtBearerTokenAuthenticationConverter with the authority claim name and prefix.- Parameters:
authoritiesClaimName- authority claim nameauthorityPrefix- the prefix name of the authority
-
AadJwtBearerTokenAuthenticationConverter
public AadJwtBearerTokenAuthenticationConverter(String principalClaimName, Map<String, String> claimToAuthorityPrefixMap) Deprecated.Using spring security provides JwtGrantedAuthoritiesConverter, it can resolve the access token of scp or roles.- Parameters:
principalClaimName- the claim name for the principalclaimToAuthorityPrefixMap- the authority name and prefix map
-
AadJwtBearerTokenAuthenticationConverter
public AadJwtBearerTokenAuthenticationConverter(org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt, Collection<org.springframework.security.core.GrantedAuthority>> jwtGrantedAuthoritiesConverter) Deprecated.Using the custom JwtGrantedAuthoritiesConverter.- Parameters:
jwtGrantedAuthoritiesConverter- the custom granted authority converter
-
AadJwtBearerTokenAuthenticationConverter
public AadJwtBearerTokenAuthenticationConverter(String principalClaimName, org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt, Collection<org.springframework.security.core.GrantedAuthority>> jwtGrantedAuthoritiesConverter) Deprecated.Using the principal claim name and the custom JwtGrantedAuthoritiesConverter.- Parameters:
principalClaimName- the claim name for the principaljwtGrantedAuthoritiesConverter- the custom granted authority converter
-
-
Method Details
-
convert
public org.springframework.security.authentication.AbstractAuthenticationToken convert(org.springframework.security.oauth2.jwt.Jwt jwt) Deprecated.Convert the source object of typeJwtto target typeAbstractAuthenticationToken.- Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken> - Parameters:
jwt- the source object to convert, which must be an instance ofJwt(nevernull)- Returns:
- the converted object
-
JwtAuthenticationConverterinstead inAadResourceServerWebSecurityConfigurerAdapter.