Class JwkKeys.Builder
java.lang.Object
io.helidon.security.jwt.jwk.JwkKeys.Builder
- All Implemented Interfaces:
Builder<JwkKeys.Builder, JwkKeys>, Supplier<JwkKeys>
- Enclosing class:
JwkKeys
public static final class JwkKeys.Builder
extends Object
implements Builder<JwkKeys.Builder, JwkKeys>
Builder of
JwkKeys.-
Method Summary
Modifier and TypeMethodDescriptionAdd a new JWK to this keys.build()Build a new keys instance.json(JsonObject json) Load keys from JSON.Load keys from a resource (must point to JSON text content).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault JwkKeysget()default JwkKeys.Builderidentity()Instance of this builder as the correct type.default JwkKeys.Builderupdate(Consumer<JwkKeys.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Build a new keys instance.- Specified by:
buildin interfaceBuilder<JwkKeys.Builder, JwkKeys>- Returns:
- JwkKeys created from this builder
-
addKey
Add a new JWK to this keys.- Parameters:
key- the JWK instance- Returns:
- updated builder instance
-
resource
Load keys from a resource (must point to JSON text content).- Parameters:
resource- the resource with JSON data (file, classpath, URI etc.)- Returns:
- updated builder instance
- Throws:
NullPointerException- in case the path is null
-
json
Load keys from JSON.- Parameters:
json- the JSON data- Returns:
- updated builder instance
-