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
Constructors Constructor Description JWKSetBasedJWKSource(JWKSetSource<C> source)Creates a new JWK set based JWK source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()List<JWK>get(JWKSelector jwkSelector, C context)Retrieves a list of JWKs matching the specified selector.JWKSetSource<C>getJWKSetSource()Returns the underlying JWK set source.
-
-
-
Constructor Detail
-
JWKSetBasedJWKSource
public JWKSetBasedJWKSource(JWKSetSource<C> source)
Creates a new JWK set based JWK source.- Parameters:
source- The JWK set source. Must not benull.
-
-
Method Detail
-
get
public List<JWK> get(JWKSelector jwkSelector, C context) throws KeySourceException
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
public JWKSetSource<C> getJWKSetSource()
Returns the underlying JWK set source.- Returns:
- The JWK set source.
-
close
public void close() throws IOException
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-