Class EncryptedJwtBuilder

    • Constructor Detail

      • EncryptedJwtBuilder

        public EncryptedJwtBuilder​(Key publicKey)
        Constructs a new EncryptedJwtBuilder that will use the given public key to encrypt the JWT.
        Parameters:
        publicKey - The public key to encrypt the JWT with.
    • Method Detail

      • signedWith

        public EncryptedThenSignedJwtBuilder signedWith​(SigningHandler signingHandler,
                                                        JwsAlgorithm jwsAlgorithm)
        Returns an EncryptedThenSignedJwtBuilder that will build a signed JWT with this builder's encrypted JWT as its payload.
        Parameters:
        signingHandler - The SigningHandler instance used to sign the JWS.
        jwsAlgorithm - The JwsAlgorithm to use when signing the JWT.
        Returns:
        The EncryptedThenSignedJwtBuilder instance.
      • asJwt

        public EncryptedJwt asJwt()
        Description copied from interface: JwtBuilder
        Builds the JWT object from its constituent parts.
        Returns:
        The Jwt.
      • build

        public String build()
        Builds the JWE into a String by calling the build method on the JWE object.

        Returns:
        The base64url encoded UTF-8 parts of the JWE.
        See Also:
        EncryptedJwt.build()