Class ECSignatureGenerator

All Implemented Interfaces:
SignatureConfiguration, SignatureGeneratorConfiguration

public class ECSignatureGenerator extends ECSignature implements SignatureGeneratorConfiguration
Elliptic curve signature generator. Extends ECSignature adding the ability to sign JWT.
Since:
1.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

  • Method Details

    • sign

      public com.nimbusds.jwt.SignedJWT sign(com.nimbusds.jwt.JWTClaimsSet claims) throws com.nimbusds.jose.JOSEException
      Description copied from interface: SignatureGeneratorConfiguration
      Generate a signed JWT based on claims.
      Specified by:
      sign in interface SignatureGeneratorConfiguration
      Parameters:
      claims - the provided claims
      Returns:
      the signed JWT
      Throws:
      com.nimbusds.jose.JOSEException - could be thrown while signing the JWT token
    • signWithPrivateKey

      protected com.nimbusds.jwt.SignedJWT signWithPrivateKey(com.nimbusds.jwt.JWTClaimsSet claims, @NonNull @NonNull ECPrivateKey privateKey, @Nullable @Nullable String kid) throws com.nimbusds.jose.JOSEException
      Parameters:
      claims - The JWT Claims
      privateKey - The EC Private Key
      kid - Key ID
      Returns:
      A signed JWT
      Throws:
      com.nimbusds.jose.JOSEException - thrown in the JWT signing