public interface KeyOperation extends Identifiable
KeyOperation
identifies a behavior for which a key may be used. Key validation
algorithms may inspect a key's operations and reject the key if it is being used in a manner inconsistent
with its indicated operations.
KeyOperation Identifier
This interface extends Identifiable
; the value returned from Identifiable.getId()
is a
CaSe-SeNsItIvE value that uniquely identifies the operation among other KeyOperation instances.
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Returns a brief description of the key operation behavior.
|
boolean |
isRelated(KeyOperation operation)
Returns
true if the specified operation is an acceptable use case for the key already assigned
this operation, false otherwise. |
getId
String getDescription()
boolean isRelated(KeyOperation operation)
true
if the specified operation
is an acceptable use case for the key already assigned
this operation, false
otherwise. As described in the
JWK key_ops (Key Operations) Parameter
specification, Key validation algorithms will likely reject keys with inconsistent or unrelated operations
because of the security vulnerabilities that could occur otherwise.operation
- the key operation to check if it is related to (consistent or compatible with) this operation.true
if the specified operation
is an acceptable use case for the key already assigned
this operation, false
otherwise.Copyright © 2014–2025 jsonwebtoken.io. All rights reserved.