public class AADJwtBearerTokenAuthenticationConverter extends Object implements org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>
Converter that takes a Jwt and converts it into a BearerTokenAuthentication.| Constructor and Description |
|---|
AADJwtBearerTokenAuthenticationConverter()
Construct AADJwtBearerTokenAuthenticationConverter by AADTokenClaim.SUB and
DEFAULT_CLAIM_TO_AUTHORITY_PREFIX_MAP.
|
AADJwtBearerTokenAuthenticationConverter(String authoritiesClaimName)
Construct AADJwtBearerTokenAuthenticationConverter with the authority claim.
|
AADJwtBearerTokenAuthenticationConverter(String principalClaimName,
Map<String,String> claimToAuthorityPrefixMap)
Using spring security provides JwtGrantedAuthoritiesConverter, it can resolve the access token of scp or roles.
|
AADJwtBearerTokenAuthenticationConverter(String authoritiesClaimName,
String authorityPrefix)
Construct AADJwtBearerTokenAuthenticationConverter with the authority claim name and prefix.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.authentication.AbstractAuthenticationToken |
convert(org.springframework.security.oauth2.jwt.Jwt jwt) |
public AADJwtBearerTokenAuthenticationConverter()
public AADJwtBearerTokenAuthenticationConverter(String authoritiesClaimName)
authoritiesClaimName - authority claim namepublic AADJwtBearerTokenAuthenticationConverter(String authoritiesClaimName, String authorityPrefix)
authoritiesClaimName - authority claim nameauthorityPrefix - the prefix name of the authoritypublic AADJwtBearerTokenAuthenticationConverter(String principalClaimName, Map<String,String> claimToAuthorityPrefixMap)
principalClaimName - authorities claim nameclaimToAuthorityPrefixMap - the authority name and prefix mappublic org.springframework.security.authentication.AbstractAuthenticationToken convert(org.springframework.security.oauth2.jwt.Jwt jwt)
convert in interface org.springframework.core.convert.converter.Converter<org.springframework.security.oauth2.jwt.Jwt,org.springframework.security.authentication.AbstractAuthenticationToken>Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.