Package io.moov.sdk.models.components
Class JSONWebKey.Builder
- java.lang.Object
-
- io.moov.sdk.models.components.JSONWebKey.Builder
-
- Enclosing class:
- JSONWebKey
public static final class JSONWebKey.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JSONWebKey.Builderalg(java.lang.String alg)The algorithm intended for use with the key, e.g., 'RS256' or 'ES256'.JSONWebKey.Builderalg(java.util.Optional<java.lang.String> alg)The algorithm intended for use with the key, e.g., 'RS256' or 'ES256'.JSONWebKeybuild()JSONWebKey.Buildercrv(java.lang.String crv)The curve for Elliptic Curve keys, e.g., 'P-256', 'P-384', or 'P-521'.JSONWebKey.Buildercrv(java.util.Optional<java.lang.String> crv)The curve for Elliptic Curve keys, e.g., 'P-256', 'P-384', or 'P-521'.JSONWebKey.Buildere(java.lang.String e)The exponent value for RSA keys.JSONWebKey.Buildere(java.util.Optional<java.lang.String> e)The exponent value for RSA keys.JSONWebKey.BuilderkeyOps(java.util.List<java.lang.String> keyOps)The permitted operations for the key, e.g., 'sign', 'verify', 'encrypt', 'decrypt'.JSONWebKey.BuilderkeyOps(java.util.Optional<? extends java.util.List<java.lang.String>> keyOps)The permitted operations for the key, e.g., 'sign', 'verify', 'encrypt', 'decrypt'.JSONWebKey.Builderkid(java.lang.String kid)A unique identifier for the key.JSONWebKey.Builderkid(java.util.Optional<java.lang.String> kid)A unique identifier for the key.JSONWebKey.Builderkty(java.lang.String kty)The cryptographic algorithm family used with the key (e.g., 'RSA', 'EC', 'oct').JSONWebKey.Buildern(java.lang.String n)The modulus value for RSA keys.JSONWebKey.Buildern(java.util.Optional<java.lang.String> n)The modulus value for RSA keys.JSONWebKey.Builderuse(Use use)The intended use of the key.JSONWebKey.Builderuse(java.util.Optional<? extends Use> use)The intended use of the key.JSONWebKey.Builderx(java.lang.String x)The x coordinate for Elliptic Curve keys.JSONWebKey.Builderx(java.util.Optional<java.lang.String> x)The x coordinate for Elliptic Curve keys.JSONWebKey.Buildery(java.lang.String y)The y coordinate for Elliptic Curve keys.JSONWebKey.Buildery(java.util.Optional<java.lang.String> y)The y coordinate for Elliptic Curve keys.
-
-
-
Method Detail
-
kty
public JSONWebKey.Builder kty(java.lang.String kty)
The cryptographic algorithm family used with the key (e.g., 'RSA', 'EC', 'oct').
-
use
public JSONWebKey.Builder use(Use use)
The intended use of the key. 'sig' for signature, 'enc' for encryption.
-
use
public JSONWebKey.Builder use(java.util.Optional<? extends Use> use)
The intended use of the key. 'sig' for signature, 'enc' for encryption.
-
keyOps
public JSONWebKey.Builder keyOps(java.util.List<java.lang.String> keyOps)
The permitted operations for the key, e.g., 'sign', 'verify', 'encrypt', 'decrypt'.
-
keyOps
public JSONWebKey.Builder keyOps(java.util.Optional<? extends java.util.List<java.lang.String>> keyOps)
The permitted operations for the key, e.g., 'sign', 'verify', 'encrypt', 'decrypt'.
-
alg
public JSONWebKey.Builder alg(java.lang.String alg)
The algorithm intended for use with the key, e.g., 'RS256' or 'ES256'.
-
alg
public JSONWebKey.Builder alg(java.util.Optional<java.lang.String> alg)
The algorithm intended for use with the key, e.g., 'RS256' or 'ES256'.
-
kid
public JSONWebKey.Builder kid(java.lang.String kid)
A unique identifier for the key.
-
kid
public JSONWebKey.Builder kid(java.util.Optional<java.lang.String> kid)
A unique identifier for the key.
-
crv
public JSONWebKey.Builder crv(java.lang.String crv)
The curve for Elliptic Curve keys, e.g., 'P-256', 'P-384', or 'P-521'.This field is required when `kty` is 'EC'.
-
crv
public JSONWebKey.Builder crv(java.util.Optional<java.lang.String> crv)
The curve for Elliptic Curve keys, e.g., 'P-256', 'P-384', or 'P-521'.This field is required when `kty` is 'EC'.
-
x
public JSONWebKey.Builder x(java.lang.String x)
The x coordinate for Elliptic Curve keys.This field is required when `kty` is 'EC'.
-
x
public JSONWebKey.Builder x(java.util.Optional<java.lang.String> x)
The x coordinate for Elliptic Curve keys.This field is required when `kty` is 'EC'.
-
y
public JSONWebKey.Builder y(java.lang.String y)
The y coordinate for Elliptic Curve keys.This field is required when `kty` is 'EC'.
-
y
public JSONWebKey.Builder y(java.util.Optional<java.lang.String> y)
The y coordinate for Elliptic Curve keys.This field is required when `kty` is 'EC'.
-
n
public JSONWebKey.Builder n(java.lang.String n)
The modulus value for RSA keys.This field is required when `kty` is 'RSA'.
-
n
public JSONWebKey.Builder n(java.util.Optional<java.lang.String> n)
The modulus value for RSA keys.This field is required when `kty` is 'RSA'.
-
e
public JSONWebKey.Builder e(java.lang.String e)
The exponent value for RSA keys.This field is required when `kty` is 'RSA'.
-
e
public JSONWebKey.Builder e(java.util.Optional<java.lang.String> e)
The exponent value for RSA keys.This field is required when `kty` is 'RSA'.
-
build
public JSONWebKey build()
-
-