Class SigningManager

java.lang.Object
org.forgerock.json.jose.jws.SigningManager

public class SigningManager extends Object
A service to get the appropriate SigningHandler for a specific Java Cryptographic signing algorithm.

For details of all supported signing algorithms see JwsAlgorithm

Since:
2.0.0
  • Constructor Details

  • Method Details

    • newNopSigningHandler

      Constructs an implementation of the SigningHandler which does not perform any signing or verifying.
      Returns:
      an implementation of the SigningHandler which does not perform any signing or verifying.
    • newHmacSigningHandler

      public SigningHandler newHmacSigningHandler(byte[] sharedSecret)
      Constructs a new HmacSigningHandler.
      Parameters:
      sharedSecret - The shared secret to use to sign the data.
      Returns:
      a new HmacSigningHandler.
    • newRsaSigningHandler

      Constructs a new RSASigningHandler, with a SignatureUtil instance to delegate the signing and verifying calls to.
      Parameters:
      key - The key used to sign and verify the signature.
      Returns:
      a new RSASigningHandler, with a SignatureUtil instance to delegate the signing and verifying calls to.
    • newEcdsaSigningHandler

      Constructs a new handler for signing ES256 signatures.
      Parameters:
      key - the elliptic curve private key. Should use the required curve for the given signing algorithm (P-256 for ES256).
      Returns:
      the signing handler.
    • newEcdsaVerificationHandler

      Constructs a new handler for verifying ES256 signatures.
      Parameters:
      key - the elliptic curve public key. Should use the required curve for the given signing algorithm (P-256 for ES256).
      Returns:
      the signing handler configured for verification.