K - the type of Java PrivateKey provided by the created private JWK.L - the type of Java PublicKey paired with the private key.M - the type of PrivateJwk createdJ - the type of PublicJwk paired with the created private JWK.T - the type of the builder, for subtype method chainingpublic interface PrivateJwkBuilder<K extends PrivateKey,L extends PublicKey,J extends PublicJwk<L>,M extends PrivateJwk<K,L,J>,T extends PrivateJwkBuilder<K,L,J,M,T>> extends AsymmetricJwkBuilder<K,M,T>
AsymmetricJwkBuilder that creates PrivateJwk instances.publicKey(PublicKey)| Modifier and Type | Method and Description |
|---|---|
T |
publicKey(L publicKey)
Allows specifying of the
PublicKey associated with the builder's existing PrivateKey,
offering a reasonable performance enhancement when building the final private JWK. |
publicKeyUsealgorithm, id, idFromThumbprint, idFromThumbprint, operationsadd, add, delete, emptyprovider, randomoperationPolicyx509Sha1Thumbprint, x509Sha256Thumbprintx509Chain, x509Sha1Thumbprint, x509Sha256Thumbprint, x509UrlT publicKey(L publicKey)
PublicKey associated with the builder's existing PrivateKey,
offering a reasonable performance enhancement when building the final private JWK. Application developers
should prefer to use this method when possible when building private JWKs.
As discussed in the PrivateJwk documentation, the JWK and JWA specifications require private JWKs to
contain both private key and public key data. If a public key is not provided via this
publicKey method, the builder implementation must go through the work to derive the
PublicKey instance based on the PrivateKey to obtain the necessary public key information.
Calling this method with the PrivateKey's matching PublicKey instance eliminates the need
for the builder to do that work.
publicKey - the PublicKey that matches the builder's existing PrivateKey.Copyright © 2014–2024 jsonwebtoken.io. All rights reserved.