Interface JwkSource
- All Known Implementing Classes:
JwkSet, RemoteJwkSet
public interface JwkSource
Where keys come from: a set held in memory, a file read at start-up, another server's published set. What signs asks it for a private key; what verifies, for the public ones.
JwkSource keys = JwkSet.of(Jwk.ofPrivateKey(KeyFiles.readPrivateKey(path)));
A source is asked every time a key is needed, so one that changes its answer -- a new key put first, the old one kept until its tokens have expired -- rotates the key without anything being rebuilt.
-
Method Summary
-
Method Details
-
getKeys
The keys, the one to sign with first.- Throws:
IOException- when the keys cannot be had: a server that publishes them is not answering
-