Class SignedJwtBuilderImpl

    • Constructor Detail

      • SignedJwtBuilderImpl

        public SignedJwtBuilderImpl​(SigningHandler signingHandler)
        Constructs a new SignedJwtBuilderImpl that will use the given private key to sign the JWT.
        Parameters:
        signingHandler - The SigningHandler instance used to sign the JWS.
    • Method Detail

      • headers

        public JwsHeaderBuilder headers()
        Gets the JwsHeaderBuilder that this JwtBuilder will use to build the JWS' header parameters.
        Specified by:
        headers in class AbstractJwtBuilder
        Returns:
        The JwsHeaderBuilder instance.
      • encrypt

        @Deprecated
        public SignedThenEncryptedJwtBuilder encrypt​(Key encryptionKey)
        Deprecated.
        Prefer encrypt(EncryptionKey) instead.
        Wraps the signed JWT in an outer encrypted JWE envelope.
        Parameters:
        encryptionKey - the key to use for encryption. This should either be a symmetric secret key or a public key.
        Returns:
        the nested encrypted signed JWT builder.
      • encrypt

        public SignedThenEncryptedJwtBuilder encrypt​(EncryptionKey<?> encryptionKey)
        Wraps the signed JWT in an outer encrypted JWE envelope.
        Parameters:
        encryptionKey - the key to use for encryption.
        Returns:
        the nested encrypted signed JWT builder.
      • asJwt

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

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

        Specified by:
        build in interface JwtBuilder
        Returns:
        The base64url encoded UTF-8 parts of the JWS.
        See Also:
        SignedJwt.build()