public class RSASignatureGenerator extends RSASignature implements SignatureGeneratorConfiguration
RSASignature
to add methods to sign JWT.algorithm
Constructor and Description |
---|
RSASignatureGenerator(RSASignatureGeneratorConfiguration 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,
RSAPrivateKey privateKey) |
supportedAlgorithmsMessage, supports, verify
getAlgorithm, setAlgorithm
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
supportedAlgorithmsMessage, supports, verify
public RSASignatureGenerator(RSASignatureGeneratorConfiguration config)
config
- Instance of RSASignatureConfiguration
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 RSAPrivateKey privateKey) throws com.nimbusds.jose.JOSEException
claims
- The JWT ClaimsprivateKey
- The RSA Private Keycom.nimbusds.jose.JOSEException
- thrown in the JWT signing