Module io.inverno.mod.security.jose
Interface OKPJWK<A extends PublicKey,B extends PrivateKey>
- Type Parameters:
A
- the public key typeB
- the private key type
- All Superinterfaces:
AsymmetricJWK<A,
,B> JWK
,X509JWK<A,
B>
Octet Key Pair JSON Web Key.
An Octet Key Pair JWK is asymmetric.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Octet Key Pair key type as defined by RFC8037 Section 2.Fields inherited from interface io.inverno.mod.security.jose.jwk.JWK
DEFAULT_THUMBPRINT_DIGEST, KEY_OP_DECRYPT, KEY_OP_DERIVE_BITS, KEY_OP_DERIVE_KEY, KEY_OP_ENCRYPT, KEY_OP_SIGN, KEY_OP_UNWRAP_KEY, KEY_OP_VERIFY, KEY_OP_WRAP_KEY, USE_ENC, USE_SIG
-
Method Summary
Modifier and TypeMethodDescriptiongetCurve()
Returns the JWA Elliptic curve name.Returns the private key encoded as Base64URL.Returns the public key encoded as Base64URL.minify()
Returns a minified representation of the key only containing required data.Returns a public and safe to share representation of the key.trust()
Trusts the key explicitly.Methods inherited from interface io.inverno.mod.security.jose.jwk.AsymmetricJWK
toPrivateKey, toPublicKey
Methods inherited from interface io.inverno.mod.security.jose.jwk.JWK
cipher, cipher, equals, getAlgorithm, getKeyId, getKeyOperations, getKeyType, getPublicKeyUse, hashCode, isTrusted, keyManager, keyManager, signer, signer, supportsAlgorithm, toJWKThumbprint, toJWKThumbprint
Methods inherited from interface io.inverno.mod.security.jose.jwk.X509JWK
getX509Certificate, getX509CertificateChain, getX509CertificateSHA1Thumbprint, getX509CertificateSHA256Thumbprint, getX509CertificateURL
-
Field Details
-
KEY_TYPE
Octet Key Pair key type as defined by RFC8037 Section 2.- See Also:
-
-
Method Details
-
getCurve
String getCurve()Returns the JWA Elliptic curve name.
- Returns:
- the Elliptic curve name
-
getPublicKey
String getPublicKey()Returns the public key encoded as Base64URL.
- Returns:
- the Base64URL encoded public key with no padding.
-
getPrivateKey
String getPrivateKey()Returns the private key encoded as Base64URL.
- Returns:
- the Base64URL encoded private key with no padding.
-
toPublicJWK
Description copied from interface:JWK
Returns a public and safe to share representation of the key.
- Specified by:
toPublicJWK
in interfaceAsymmetricJWK<A extends PublicKey,
B extends PrivateKey> - Specified by:
toPublicJWK
in interfaceJWK
- Specified by:
toPublicJWK
in interfaceX509JWK<A extends PublicKey,
B extends PrivateKey> - Returns:
- a public representation of this JWK
-
minify
Description copied from interface:JWK
Returns a minified representation of the key only containing required data.
Note that the returned JWK may contain private data.
-
trust
Description copied from interface:JWK
Trusts the key explicitly.
This should be used with care when the authenticity of an untrusted key has been established through external means.
- Specified by:
trust
in interfaceAsymmetricJWK<A extends PublicKey,
B extends PrivateKey> - Specified by:
trust
in interfaceJWK
- Specified by:
trust
in interfaceX509JWK<A extends PublicKey,
B extends PrivateKey> - Returns:
- this JWK
-