Class RSASignatureGenerator

    • Method Detail

      • 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
                                                                java.security.interfaces.RSAPrivateKey privateKey)
                                                         throws com.nimbusds.jose.JOSEException
        Parameters:
        claims - The JWT Claims
        privateKey - The RSA Private Key
        Returns:
        A signed JWT
        Throws:
        com.nimbusds.jose.JOSEException - thrown in the JWT signing