Module io.inverno.mod.security.jose
Class GenericJWKURLResolver
java.lang.Object
io.inverno.mod.security.jose.internal.jwk.GenericJWKURLResolver
- All Implemented Interfaces:
JWKURLResolver
Generic JSON Web Key URL resolver implementation.
This is an overridable bean which can be overriden by injecting a custom JWKURLResolver instance when building the JOSE module.
The URL resolution will be disabled if the optional resource service is missing.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionGenericJWKURLResolver(com.fasterxml.jackson.databind.ObjectMapper mapper) Creates a generic JWK URL resolver. -
Method Summary
Modifier and TypeMethodDescriptionresolveJWKSetURL(URI jku) Resolves a JSON JWK or JWK set at the specified location and returns corresponding keys represented as maps.reactor.core.publisher.Mono<List<X509Certificate>>Resolves the X.509 certificates chain at the specified location as defined by RFC7515 Section 4.1.5voidsetResourceService(ResourceService resourceService) Sets the resource service.
-
Constructor Details
-
GenericJWKURLResolver
public GenericJWKURLResolver(com.fasterxml.jackson.databind.ObjectMapper mapper) Creates a generic JWK URL resolver.
- Parameters:
mapper- an object mapper
-
-
Method Details
-
setResourceService
Sets the resource service.
- Parameters:
resourceService- a resource service
-
resolveJWKSetURL
public org.reactivestreams.Publisher<Map<String,Object>> resolveJWKSetURL(URI jku) throws JWKResolveException Description copied from interface:JWKURLResolverResolves a JSON JWK or JWK set at the specified location and returns corresponding keys represented as maps.
- Specified by:
resolveJWKSetURLin interfaceJWKURLResolver- Parameters:
jku- the URI of the JSON JWK or JWK set resource- Returns:
- a publisher of parsed keys represented as maps
- Throws:
JWKResolveException- if there was an error resolving the resource
-
resolveX509CertificateURL
public reactor.core.publisher.Mono<List<X509Certificate>> resolveX509CertificateURL(URI x5u) throws JWKResolveException Description copied from interface:JWKURLResolverResolves the X.509 certificates chain at the specified location as defined by RFC7515 Section 4.1.5
- Specified by:
resolveX509CertificateURLin interfaceJWKURLResolver- Parameters:
x5u- the URI of the X.509 certificate chain- Returns:
- a single X.509 certificates chain publisher
- Throws:
JWKResolveException- if there was an error resolving the certificates chain
-