public interface KeyOperationBuilder extends Builder<KeyOperation>
KeyOperationBuilder produces KeyOperation instances that may be added to a JWK's
key operations parameter. This is primarily only useful for creating
custom (non-standard) KeyOperations for use with a custom KeyOperationPolicy, as all standard ones
are available already via the Jwks.OP registry singleton.Jwks.OP.builder(),
Jwks.OP.policy(),
KeyOperationPolicied.operationPolicy(KeyOperationPolicy)| Modifier and Type | Method and Description |
|---|---|
KeyOperationBuilder |
description(String description)
Sets the key operation
description. |
KeyOperationBuilder |
id(String id)
Sets the CaSe-SeNsItIvE
id expected to be unique compared to all other
KeyOperations. |
KeyOperationBuilder |
related(String id)
Indicates that the
KeyOperation with the given id is cryptographically
related (and complementary) to this one, and may be specified together in a JWK's
operations set. |
KeyOperationBuilder id(String id)
id expected to be unique compared to all other
KeyOperations.id - the key operation idKeyOperationBuilder description(String description)
description.description - the key operation descriptionKeyOperationBuilder related(String id)
KeyOperation with the given id is cryptographically
related (and complementary) to this one, and may be specified together in a JWK's
operations set.
More concretely, calling this method will ensure the following:
KeyOperation built = Jwks.operation()/*...*/.related(otherId).build();
KeyOperation other = getKeyOperation(otherId);
assert built.isRelated(other);
A JwkBuilder's key operation policy is likely
to reject any unrelated operations specified
together due to the potential security vulnerabilities that could occur.
This method may be called multiple times to add/append a related id to the constructed
KeyOperation's total set of related ids.
id - the id of a KeyOperation that will be considered cryptographically related to this one.KeyOperationPolicied.operationPolicy(KeyOperationPolicy)Copyright © 2014–2023 jsonwebtoken.io. All rights reserved.