Package io.helidon.security.jwt.jwk
Class JwkOctet.Builder
- java.lang.Object
-
- io.helidon.security.jwt.jwk.JwkOctet.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaddOperation(String operation)Add intended operation of this JWK.Talgorithm(String algorithm)Algorithm of the key being built.JwkOctetbuild()Build a newJwkOctetinstance from this builder.JwkOctet.BuilderfromJson(JsonObject json)Update this builder from JWK in json format.TkeyId(String keyId)Key id of the key being built.TkeyType(String keyType)Key type of the key being built.Toperations(List<String> operations)Intended operations of this JWK.Tusage(String usage)Intended usage of this JWK.
-
-
-
Method Detail
-
fromJson
public JwkOctet.Builder fromJson(JsonObject json)
Update this builder from JWK in json format.- Parameters:
json- JsonObject with the JWK- Returns:
- updated builder instance, just call
build()to build theJwkOctetinstance - See Also:
as a shortcut if no additional configuration is to be done
-
keyType
public T keyType(String keyType)
Key type of the key being built.- Parameters:
keyType- one of supported key types- Returns:
- updated builder instance
- See Also:
Jwk.KEY_TYPE_EC,Jwk.KEY_TYPE_RSA,Jwk.KEY_TYPE_OCT
-
keyId
public T keyId(String keyId)
Key id of the key being built. Note that within one set of keysJwkKeysthis must be unique.- Parameters:
keyId- key id to map from a signed entity (such as JWT) to JWK definition- Returns:
- updated builder instance
-
algorithm
public T algorithm(String algorithm)
Algorithm of the key being built. Algorithm is optional (each type may have a reasonable default).
-
usage
public T usage(String usage)
Intended usage of this JWK. You may configure usage,operationsor neither (never both).- Parameters:
usage- usage of this JWK- Returns:
- updated builder instance
- See Also:
Jwk.USE_ENCRYPTION,Jwk.USE_SIGNATURE
-
operations
public T operations(List<String> operations)
Intended operations of this JWK. You may configure operations,usageor neither (never both).- Parameters:
operations- operations to use, replaces existing operations- Returns:
- updated builder instance
-
-