Class MSEntraAccessTokenJWSVerifier
- java.lang.Object
-
- org.apache.syncope.core.spring.security.jws.MSEntraAccessTokenJWSVerifier
-
- All Implemented Interfaces:
com.nimbusds.jose.jca.JCAAware<com.nimbusds.jose.jca.JCAContext>
,com.nimbusds.jose.JOSEProvider
,com.nimbusds.jose.JWSProvider
,com.nimbusds.jose.JWSVerifier
public class MSEntraAccessTokenJWSVerifier extends Object implements com.nimbusds.jose.JWSVerifier
-
-
Field Summary
Fields Modifier and Type Field Description protected String
appId
protected Duration
cacheExpireAfterWrite
protected HttpClient
httpClient
protected JsonMapper
jsonMapper
protected static Logger
LOG
protected String
tenantId
protected com.github.benmanes.caffeine.cache.LoadingCache<String,com.nimbusds.jose.JWSVerifier>
verifiersCache
-
Constructor Summary
Constructors Constructor Description MSEntraAccessTokenJWSVerifier(String tenantId, String appId, Duration cacheExpireAfterWrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
extractJwksUri(String openIdMetadataDocument)
protected String
fetchDocument(String url)
protected Map<String,com.nimbusds.jose.JWSVerifier>
getAllFromCache()
com.nimbusds.jose.jca.JCAContext
getJCAContext()
protected String
getOpenIDMetadataDocumentUrl()
protected Map<String,com.nimbusds.jose.JWSVerifier>
parseJsonWebKeySet(String jsonWebKeySet)
Set<com.nimbusds.jose.JWSAlgorithm>
supportedJWSAlgorithms()
boolean
verify(com.nimbusds.jose.JWSHeader header, byte[] signingInput, com.nimbusds.jose.util.Base64URL signature)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
tenantId
protected final String tenantId
-
appId
protected final String appId
-
cacheExpireAfterWrite
protected final Duration cacheExpireAfterWrite
-
httpClient
protected final HttpClient httpClient
-
jsonMapper
protected final JsonMapper jsonMapper
-
verifiersCache
protected final com.github.benmanes.caffeine.cache.LoadingCache<String,com.nimbusds.jose.JWSVerifier> verifiersCache
-
-
Method Detail
-
getOpenIDMetadataDocumentUrl
protected String getOpenIDMetadataDocumentUrl()
-
parseJsonWebKeySet
protected Map<String,com.nimbusds.jose.JWSVerifier> parseJsonWebKeySet(String jsonWebKeySet)
-
supportedJWSAlgorithms
public Set<com.nimbusds.jose.JWSAlgorithm> supportedJWSAlgorithms()
- Specified by:
supportedJWSAlgorithms
in interfacecom.nimbusds.jose.JWSProvider
-
getJCAContext
public com.nimbusds.jose.jca.JCAContext getJCAContext()
- Specified by:
getJCAContext
in interfacecom.nimbusds.jose.jca.JCAAware<com.nimbusds.jose.jca.JCAContext>
-
verify
public boolean verify(com.nimbusds.jose.JWSHeader header, byte[] signingInput, com.nimbusds.jose.util.Base64URL signature) throws com.nimbusds.jose.JOSEException
- Specified by:
verify
in interfacecom.nimbusds.jose.JWSVerifier
- Throws:
com.nimbusds.jose.JOSEException
-
-