Package com.nimbusds.jose.jwk.source
Class JWKSetBasedJWKSource<C extends SecurityContext>
java.lang.Object
com.nimbusds.jose.jwk.source.JWKSetBasedJWKSource<C>
- All Implemented Interfaces:
JWKSource<C>,Closeable,AutoCloseable
@ThreadSafe
public class JWKSetBasedJWKSource<C extends SecurityContext>
extends Object
implements JWKSource<C>, Closeable
JSON Web Key (JWK) set based JWK source.
- Version:
- 2022-11-22
- Author:
- Thomas Rørvik Skjølberg, Vladimir Dzhuvinov
-
Constructor Summary
ConstructorsConstructorDescriptionJWKSetBasedJWKSource(JWKSetSource<C> source) Creates a new JWK set based JWK source. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()get(JWKSelector jwkSelector, C context) Retrieves a list of JWKs matching the specified selector.Returns the underlying JWK set source.
-
Constructor Details
-
JWKSetBasedJWKSource
Creates a new JWK set based JWK source.- Parameters:
source- The JWK set source. Must not benull.
-
-
Method Details
-
get
Description copied from interface:JWKSourceRetrieves a list of JWKs matching the specified selector.- Specified by:
getin interfaceJWKSource<C extends SecurityContext>- Parameters:
jwkSelector- A JWK selector. Must not benull.context- Optional context,nullif not required.- Returns:
- The matching JWKs, empty list if no matches were found.
- Throws:
KeySourceException- If key sourcing failed.
-
getJWKSetSource
Returns the underlying JWK set source.- Returns:
- The JWK set source.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-