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>,java.io.Closeable,java.lang.AutoCloseable
@ThreadSafe public class JWKSetBasedJWKSource<C extends SecurityContext> extends java.lang.Object implements JWKSource<C>, java.io.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()java.util.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 java.util.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 java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-