Interface JwtEncryptionBuilder

  • All Superinterfaces:
    JwtEncryption

    public interface JwtEncryptionBuilder
    extends JwtEncryption
    JWT JsonWebEncryption Builder.

    JwtEncryptionBuilder implementations must set the 'alg' (algorithm) header to 'RSA-OAEP-256' and 'enc' (content encryption algorithm) header to 'A256GCM' unless they have already been set. The 'cty' (content type) header must be set to 'JWT' when the inner signed JWT is encrypted.

    Note that JwtEncryptionBuilder implementations are not expected to be thread-safe. However reusing a single JwtEncryptionBuilder for creating more than one encrypted token is not recommended because a single JwtEncryptionBuilder can not provide a unique token identifier per every token.

    See Also:
    RFC7516