Interface JwtSignatureBuilder

All Superinterfaces:
JwtSignature

public interface JwtSignatureBuilder extends JwtSignature
JWT JsonWebSignature Builder.

JwtSignatureBuilder implementations must set the 'alg' (algorithm) header to 'RS256' and 'typ' (token type) header to 'JWT' unless they have already been set.

Note that JwtSignatureBuilder implementations are not expected to be thread-safe.

See Also:
  • Method Details

    • algorithm

      JwtSignatureBuilder algorithm(io.smallrye.jwt.algorithm.SignatureAlgorithm algorithm)
      Set a signature algorithm. Note that only 'RS256' (default), 'ES256' and 'HS256' algorithms must be supported.
      Parameters:
      algorithm - the signature algorithm
      Returns:
      JwtSignatureBuilder
      Since:
      2.1.3
    • signatureAlgorithm

      @Deprecated default JwtSignatureBuilder signatureAlgorithm(io.smallrye.jwt.algorithm.SignatureAlgorithm algorithm)
      Set a signature algorithm. Note that only 'RS256' (default), 'ES256' and 'HS256' algorithms must be supported.
      Parameters:
      algorithm - the signature algorithm
      Returns:
      JwtSignatureBuilder
    • keyId

      Set a 'kid' signature key id.
      Parameters:
      keyId - the key id
      Returns:
      JwtSignatureBuilder
      Since:
      2.1.3
    • signatureKeyId

      @Deprecated default JwtSignatureBuilder signatureKeyId(String keyId)
      Deprecated.
      Set a 'kid' signature key id.
      Parameters:
      keyId - the key id
      Returns:
      JwtSignatureBuilder
    • thumbprint

      Set X.509 Certificate SHA-1 'x5t' thumbprint.
      Parameters:
      cert - the certificate
      Returns:
      JwtSignatureBuilder
    • thumbprintS256

      JwtSignatureBuilder thumbprintS256(X509Certificate cert)
      Set X.509 Certificate SHA-256 'x5t#S256' thumbprint.
      Parameters:
      cert - the certificate
      Returns:
      JwtSignatureBuilder
    • chain

      default JwtSignatureBuilder chain(X509Certificate cert)
      Set X.509 Certificate 'x5c' chain.
      Parameters:
      cert - the certificate
      Returns:
      JwtSignatureBuilder
    • chain

      Set X.509 Certificate 'x5c' chain.
      Parameters:
      chain - the certificate chain
      Returns:
      JwtSignatureBuilder
    • jwk

      Set JSON Web Key 'jwk' key.
      Parameters:
      key - the public key
      Returns:
      JwtSignatureBuilder
    • type

      Set a token type (`typ`) header.
      Parameters:
      type - the token type
      Returns:
      JwtSignatureBuilder
    • header

      JwtSignatureBuilder header(String name, Object value)
      Custom JWT signature header. If the 'alg' (algorithm) header is set with this method then it has to match one of the SignatureAlgorithm values.
      Parameters:
      name - the header name
      value - the header value
      Returns:
      JwtSignatureBuilder