Class StaticJwksSource
java.lang.Object
com.revetsec.jose.StaticJwksSource
- All Implemented Interfaces:
JwksSource
A fixed set of verification keys, which never changes and is never fetched.
Use it for keys the application already holds, such as a key set configured with the application or fetched out of
band. It does no I/O and needs no network settings. A token whose key is not in the set is rejected as
UNKNOWN_KEY; nothing is refreshed.
A source holds no issuer: share one only among validators that expect the same issuer. Sources compare by reference.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
-
Method Details
-
fromJwks
Returns a source that holds exactly the usable keys ofjwks.- Parameters:
jwks- the key set- Returns:
- the source
- Throws:
NullPointerException- ifjwksisnullIllegalArgumentException- if the key set holds no usable key, because such a source could verify nothing- Since:
- 1.0.0
-
getJwks
-
toString
-