Package io.helidon.security.jwt.jwk
Class JwkKeys
- java.lang.Object
-
- io.helidon.security.jwt.jwk.JwkKeys
-
public final class JwkKeys extends Object
A representation of the JSON web keys document - a map of key ids to corresponding web keys. The keys may be of different types and algorithms. Example (as used in unit test):JwkKeys keys = JwkKeys.builder() .resource("jwk_data.json") .build(); Optional<Jwk> key = keys .forKeyId("cc34c0a0-bd5a-4a3c-a50d-a2a7db7643df");
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JwkKeys.Builder
Builder ofJwkKeys
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JwkKeys.Builder
builder()
Create a new builder for this class.Optional<Jwk>
forKeyId(String keyId)
Get a JWK for defined key id if present.List<Jwk>
keys()
List of keys in this instance.
-
-
-
Method Detail
-
builder
public static JwkKeys.Builder builder()
Create a new builder for this class.- Returns:
- builder instance
-
forKeyId
public Optional<Jwk> forKeyId(String keyId)
Get a JWK for defined key id if present.- Parameters:
keyId
- keyId of the key to obtain from this keys- Returns:
- Jwk if present
-
-