public static class JWKMatcher.Builder extends Object
Example usage:
JWKMatcher matcher = new JWKMatcher().keyID("123").build();
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
JWKMatcher.Builder |
algorithm(Algorithm alg)
Sets a single JOSE algorithm to match.
|
JWKMatcher.Builder |
algorithms(Algorithm... algs)
Sets multiple JOSE algorithms to match.
|
JWKMatcher.Builder |
algorithms(Set<Algorithm> algs)
Sets multiple JOSE algorithms to match.
|
JWKMatcher |
build()
Builds a new JWK matcher.
|
JWKMatcher.Builder |
curve(Curve curve)
Sets a single curve to match (for EC and OKP keys).
|
JWKMatcher.Builder |
curves(Curve... curves)
Sets multiple curves to match (for EC and OKP keys).
|
JWKMatcher.Builder |
curves(Set<Curve> curves)
Sets multiple curves to match (for EC and OKP keys).
|
JWKMatcher.Builder |
hasKeyID(boolean hasID)
Sets key ID presence matching.
|
JWKMatcher.Builder |
hasKeyUse(boolean hasUse)
Sets key use presence matching.
|
JWKMatcher.Builder |
keyID(String id)
Sets a single key ID to match.
|
JWKMatcher.Builder |
keyIDs(Set<String> ids)
Sets multiple key IDs to match.
|
JWKMatcher.Builder |
keyIDs(String... ids)
Sets multiple key IDs to match.
|
JWKMatcher.Builder |
keyOperation(KeyOperation op)
Sets a single key operation to match.
|
JWKMatcher.Builder |
keyOperations(KeyOperation... ops)
Sets multiple key operations to match.
|
JWKMatcher.Builder |
keyOperations(Set<KeyOperation> ops)
Sets multiple key operations to match.
|
JWKMatcher.Builder |
keySize(int keySizeBits)
Sets the key size.
|
JWKMatcher.Builder |
keySizes(int... keySizesBits)
Sets the key sizes.
|
JWKMatcher.Builder |
keySizes(Set<Integer> keySizesBits)
Sets the key sizes.
|
JWKMatcher.Builder |
keyType(KeyType kty)
Sets a single key type to match.
|
JWKMatcher.Builder |
keyTypes(KeyType... types)
Sets multiple key types to match.
|
JWKMatcher.Builder |
keyTypes(Set<KeyType> types)
Sets multiple key types to match.
|
JWKMatcher.Builder |
keyUse(KeyUse use)
Sets a single public key use to match.
|
JWKMatcher.Builder |
keyUses(KeyUse... uses)
Sets multiple public key uses to match.
|
JWKMatcher.Builder |
keyUses(Set<KeyUse> uses)
Sets multiple public key uses to match.
|
JWKMatcher.Builder |
maxKeySize(int maxSizeBits)
Sets the maximum key size.
|
JWKMatcher.Builder |
minKeySize(int minSizeBits)
Sets the minimal key size.
|
JWKMatcher.Builder |
privateOnly(boolean privateOnly)
Sets the private key matching policy.
|
JWKMatcher.Builder |
publicOnly(boolean publicOnly)
Sets the public key matching policy.
|
public Builder()
public JWKMatcher.Builder keyType(KeyType kty)
kty - The key type, null if not specified.public JWKMatcher.Builder keyTypes(KeyType... types)
types - The key types.public JWKMatcher.Builder keyTypes(Set<KeyType> types)
types - The key types, null if not specified.public JWKMatcher.Builder keyUse(KeyUse use)
use - The public key use, null if not
specified.public JWKMatcher.Builder keyUses(KeyUse... uses)
uses - The public key uses.public JWKMatcher.Builder keyUses(Set<KeyUse> uses)
uses - The public key uses, null if not
specified.public JWKMatcher.Builder keyOperation(KeyOperation op)
op - The key operation, null if not specified.public JWKMatcher.Builder keyOperations(KeyOperation... ops)
ops - The key operations.public JWKMatcher.Builder keyOperations(Set<KeyOperation> ops)
ops - The key operations, null if not
specified.public JWKMatcher.Builder algorithm(Algorithm alg)
alg - The JOSE algorithm, null if not
specified.public JWKMatcher.Builder algorithms(Algorithm... algs)
algs - The JOSE algorithms.public JWKMatcher.Builder algorithms(Set<Algorithm> algs)
algs - The JOSE algorithms, null if not
specified.public JWKMatcher.Builder keyID(String id)
id - The key ID, null if not specified.public JWKMatcher.Builder keyIDs(String... ids)
ids - The key IDs.public JWKMatcher.Builder keyIDs(Set<String> ids)
ids - The key IDs, null if not specified.public JWKMatcher.Builder hasKeyUse(boolean hasUse)
hasUse - true to match a key with a set use.public JWKMatcher.Builder hasKeyID(boolean hasID)
hasID - true to match a key with a set ID.public JWKMatcher.Builder privateOnly(boolean privateOnly)
privateOnly - true to match a private key.public JWKMatcher.Builder publicOnly(boolean publicOnly)
publicOnly - true to match a public only key.public JWKMatcher.Builder minKeySize(int minSizeBits)
minSizeBits - The minimum key size in bits, zero
implies no minimum key size limit.public JWKMatcher.Builder maxKeySize(int maxSizeBits)
maxSizeBits - The maximum key size in bits, zero
implies no maximum key size limit.public JWKMatcher.Builder keySize(int keySizeBits)
keySizeBits - The key size in bits, zero if not
specified.public JWKMatcher.Builder keySizes(int... keySizesBits)
keySizesBits - The key sizes in bits.public JWKMatcher.Builder keySizes(Set<Integer> keySizesBits)
keySizesBits - The key sizes in bits.public JWKMatcher.Builder curve(Curve curve)
curve - The curve, null if not specified.public JWKMatcher.Builder curves(Curve... curves)
curves - The curves.public JWKMatcher.Builder curves(Set<Curve> curves)
curves - The curves, null if not specified.public JWKMatcher build()
Copyright © 2018 Connect2id Ltd.. All rights reserved.