K - the type of PublicKey or PrivateKey represented by this JWK.public interface AsymmetricJwk<K extends Key> extends Jwk<K>, X509Accessor
| Modifier and Type | Method and Description |
|---|---|
String |
getPublicKeyUse()
Returns the JWK
use (Public Key Use)
parameter value or null if not present. |
getAlgorithm, getOperations, getType, thumbprint, thumbprint, toKeygetIdclear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, valuesgetX509Chain, getX509Sha1Thumbprint, getX509Sha256Thumbprint, getX509UrlString getPublicKeyUse()
use (Public Key Use)
parameter value or null if not present. use values are CaSe-SeNsItIvE.
The JWK specification defines the
following use values:
| Value | Key Use |
|---|---|
sig |
signature |
enc |
encryption |
Other values MAY be used. For best interoperability with other applications however, it is recommended to use only the values above.
When a key is used to wrap another key and a public key use designation for the first key is desired, the
enc (encryption) key use value is used, since key wrapping is a kind of encryption. The
enc value is also to be used for public keys used for key agreement operations.
Public Key Use vs Key Operations
Per
JWK RFC 7517, Section 4.3, last paragraph,
the use (Public Key Use) and key_ops (Key Operations) members
SHOULD NOT be used together; however, if both are used, the information they convey MUST be
consistent. Applications should specify which of these members they use, if either is to be used by the
application.
use value or null if not present.Copyright © 2014–2025 jsonwebtoken.io. All rights reserved.