public class ECSignatureGenerator extends ECSignature implements SignatureGeneratorConfiguration
ECSignature
adding the ability to sign JWT.algorithm
Constructor and Description |
---|
ECSignatureGenerator(ECSignatureGeneratorConfiguration config) |
Modifier and Type | Method and Description |
---|---|
com.nimbusds.jwt.SignedJWT |
sign(com.nimbusds.jwt.JWTClaimsSet claims)
Generate a signed JWT based on claims.
|
protected com.nimbusds.jwt.SignedJWT |
signWithPrivateKey(com.nimbusds.jwt.JWTClaimsSet claims,
java.security.interfaces.ECPrivateKey privateKey) |
supportedAlgorithmsMessage, supports, verify
getAlgorithm, setAlgorithm
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supportedAlgorithmsMessage, supports, verify
public ECSignatureGenerator(ECSignatureGeneratorConfiguration config)
config
- Instance of ECSignatureConfiguration
public com.nimbusds.jwt.SignedJWT sign(com.nimbusds.jwt.JWTClaimsSet claims) throws com.nimbusds.jose.JOSEException
SignatureGeneratorConfiguration
sign
in interface SignatureGeneratorConfiguration
claims
- the provided claimscom.nimbusds.jose.JOSEException
- could be thrown while signing the JWT tokenprotected com.nimbusds.jwt.SignedJWT signWithPrivateKey(com.nimbusds.jwt.JWTClaimsSet claims, @NonNull java.security.interfaces.ECPrivateKey privateKey) throws com.nimbusds.jose.JOSEException
claims
- The JWT ClaimsprivateKey
- The EC Private Keycom.nimbusds.jose.JOSEException
- thrown in the JWT signing