public class SigningManager extends Object
For details of all supported signing algorithms see JwsAlgorithm
Constructor and Description |
---|
SigningManager() |
Modifier and Type | Method and Description |
---|---|
SigningHandler |
newEcdsaSigningHandler(ECPrivateKey key)
Constructs a new handler for signing ES256 signatures.
|
SigningHandler |
newEcdsaSigningHandler(PrivateKey key)
Constructs a new handler for signing ES256 signatures.
|
SigningHandler |
newEcdsaVerificationHandler(ECPublicKey key)
Constructs a new handler for verifying ES256 signatures.
|
SigningHandler |
newEdDsaSigningHandler(byte[] privateKey)
Constructs a new handler for signing EdDSA signatures.
|
SigningHandler |
newEdDsaVerificationHandler(byte[] publicKey)
Constructs a new handler for verifying EdDSA signatures.
|
SigningHandler |
newHmacSigningHandler(byte[] sharedSecret)
Constructs a new HmacSigningHandler.
|
SigningHandler |
newHmacSigningHandler(SecretKey secretKey)
Constructs a new HmacSigningHandler.
|
SigningHandler |
newNopSigningHandler()
Constructs an implementation of the SigningHandler which does not perform
any signing or verifying.
|
SigningHandler |
newRsaSigningHandler(Key key)
Constructs a new RSASigningHandler, with a SignatureUtil instance to
delegate the signing and verifying calls to.
|
SigningHandler |
newSigningHandler(JWK jwk)
Returns the signing handler from the given JSON Web Key (JWK) which will be used to sign the JWT.
|
SigningHandler |
newSigningHandler(Key key)
Returns the signing handler from the given Key which will be used to verify the JWT.
|
SigningHandler |
newVerificationHandler(JWK jwk)
Returns the signing handler from the given JSON Web Key (JWK) which will be used to verify the JWT.
|
SigningHandler |
newVerificationHandler(Key key)
Returns the signing handler from the given Key which will be used to verify the JWT.
|
public SigningHandler newNopSigningHandler()
public SigningHandler newHmacSigningHandler(byte[] sharedSecret)
newHmacSigningHandler(SecretKey)
in
most cases.sharedSecret
- The shared secret to use to sign the data.public SigningHandler newHmacSigningHandler(SecretKey secretKey)
secretKey
- The secret key to use to sign the data.public SigningHandler newRsaSigningHandler(Key key)
key
- The key used to sign and verify the signature.public SigningHandler newEcdsaSigningHandler(PrivateKey key)
key
- the elliptic curve private key. Should use the required curve for the given signing algorithm
(P-256 for ES256).public SigningHandler newEcdsaSigningHandler(ECPrivateKey key)
key
- the elliptic curve private key. Should use the required curve for the given signing algorithm
(P-256 for ES256).public SigningHandler newEcdsaVerificationHandler(ECPublicKey key)
key
- the elliptic curve public key. Should use the required curve for the given signing algorithm (P-256
for ES256).public SigningHandler newEdDsaSigningHandler(byte[] privateKey)
privateKey
- the raw private key bytes.public SigningHandler newEdDsaVerificationHandler(byte[] publicKey)
publicKey
- the raw public key bytes.public SigningHandler newSigningHandler(Key key)
key
- The Key use to sign the JWT.IllegalArgumentException
- if no handler can be determined for the given key.public SigningHandler newSigningHandler(JWK jwk)
jwk
- The JSON Web Key (JWK).public SigningHandler newVerificationHandler(Key key)
key
- The Key use to verify the JWT.IllegalArgumentException
- if no handler can be determined for the given key.public SigningHandler newVerificationHandler(JWK jwk)
jwk
- The JSON Web Key (JWK).Copyright 2010-2022 ForgeRock AS.