Class Signer

java.lang.Object
net.pincette.jwt.Signer

public class Signer extends Object
Signs JTWs using the Auth0 library. It selects the algorithm based on the given private key.
Author:
Werner Donné
  • Constructor Details

    • Signer

      public Signer(String privateKey)
      Creates a JWT signer with a private key in PEM format. Only RSA and ECDSA are supported. The bit size is 256.
      Parameters:
      privateKey - the given private key of type RSA or ECDSA.
    • Signer

      public Signer(PrivateKey privateKey)
      Creates a JWT signer with a private key. Only RSA and ECDSA are supported. The bit size is 256.
      Parameters:
      privateKey - the given private key of type RSA or ECDSA.
    • Signer

      public Signer(String privateKey, BitSize bits)
      Creates a JWT signer with a private key in PEM format. Only RSA and ECDSA are supported.
      Parameters:
      privateKey - the given private key of type RSA or ECDSA.
      bits - the bit size the algorithm should use.
    • Signer

      public Signer(PrivateKey privateKey, BitSize bits)
      Creates a JWT signer with a private key. Only RSA and ECDSA are supported.
      Parameters:
      privateKey - the given private key of type RSA or ECDSA.
      bits - the bit size the algorithm should use.
  • Method Details