public class AADB2CJwtBearerTokenAuthenticationConverter extends AbstractJwtBearerTokenAuthenticationConverter
Converter that takes a Jwt and converts it into a BearerTokenAuthentication.converter, DEFAULT_PRINCIPAL_CLAIM_NAME, principalClaimName| Constructor and Description |
|---|
AADB2CJwtBearerTokenAuthenticationConverter()
Use
AADJwtGrantedAuthoritiesConverter, it can resolve the access token of scp and roles. |
AADB2CJwtBearerTokenAuthenticationConverter(String authoritiesClaimName)
Construct AADB2CJwtBearerTokenAuthenticationConverter with the authority claim.
|
AADB2CJwtBearerTokenAuthenticationConverter(String principalClaimName,
Map<String,String> claimToAuthorityPrefixMap) |
AADB2CJwtBearerTokenAuthenticationConverter(String authoritiesClaimName,
String authorityPrefix)
Construct AADB2CJwtBearerTokenAuthenticationConverter with the authority claim name and prefix.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal |
getAuthenticatedPrincipal(Map<String,Object> headers,
Map<String,Object> claims,
Collection<org.springframework.security.core.GrantedAuthority> authorities,
String tokenValue)
Construct an instance of OAuth2AuthenticatedPrincipal interface.
|
buildClaimToAuthorityPrefixMap, convert, setConverter, setPrincipalClaimNamepublic AADB2CJwtBearerTokenAuthenticationConverter()
AADJwtGrantedAuthoritiesConverter, it can resolve the access token of scp and roles.public AADB2CJwtBearerTokenAuthenticationConverter(String authoritiesClaimName)
authoritiesClaimName - authority claim namepublic AADB2CJwtBearerTokenAuthenticationConverter(String authoritiesClaimName, String authorityPrefix)
authoritiesClaimName - authority claim nameauthorityPrefix - the prefix name of the authorityprotected org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal getAuthenticatedPrincipal(Map<String,Object> headers, Map<String,Object> claims, Collection<org.springframework.security.core.GrantedAuthority> authorities, String tokenValue)
AbstractJwtBearerTokenAuthenticationConvertergetAuthenticatedPrincipal in class AbstractJwtBearerTokenAuthenticationConverterheaders - Jwt header mapclaims - Jwt claims mapauthorities - Jwt authorities collectiontokenValue - Jwt token valueCopyright © 2021 Microsoft Corporation. All rights reserved.