public class UserPrincipalManager extends Object
| Modifier and Type | Field and Description |
|---|---|
private com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> |
keySource |
| Constructor and Description |
|---|
UserPrincipalManager(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> keySource)
Creates a new
UserPrincipalManager with a predefined JWKSource. |
UserPrincipalManager(ServiceEndpointsProperties serviceEndpointsProps,
AADAuthenticationProperties aadAuthProps,
com.nimbusds.jose.util.ResourceRetriever resourceRetriever)
Create a new
UserPrincipalManager based of the ServiceEndpoints#getAadKeyDiscoveryUri() and
AADAuthenticationProperties.getEnvironment(). |
| Modifier and Type | Method and Description |
|---|---|
UserPrincipal |
buildUserPrincipal(String idToken) |
private com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext> |
getAadJwtTokenValidator(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm) |
private final com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> keySource
public UserPrincipalManager(com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> keySource)
UserPrincipalManager with a predefined JWKSource.
This is helpful in cases the JWK is not a remote JWKSet or for unit testing.
keySource - - JWKSource containing at least one keypublic UserPrincipalManager(ServiceEndpointsProperties serviceEndpointsProps, AADAuthenticationProperties aadAuthProps, com.nimbusds.jose.util.ResourceRetriever resourceRetriever)
UserPrincipalManager based of the ServiceEndpoints#getAadKeyDiscoveryUri() and
AADAuthenticationProperties.getEnvironment().serviceEndpointsProps - - used to retrieve the JWKS URLaadAuthProps - - used to retrieve the environment.resourceRetriever - - configures the RemoteJWKSet call.public UserPrincipal buildUserPrincipal(String idToken) throws ParseException, com.nimbusds.jose.JOSEException, com.nimbusds.jose.proc.BadJOSEException
ParseExceptioncom.nimbusds.jose.JOSEExceptioncom.nimbusds.jose.proc.BadJOSEExceptionprivate com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext> getAadJwtTokenValidator(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
Copyright © 2019 Microsoft. All rights reserved.