Package io.smallrye.jwt.build
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:
- RFC7515
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description JwtSignatureBuilderalgorithm(SignatureAlgorithm algorithm)Set a signature algorithm.JwtSignatureBuilderheader(String name, Object value)Custom JWT signature header.JwtSignatureBuilderkeyId(String keyId)Set a 'kid' signature key id.default JwtSignatureBuildersignatureAlgorithm(SignatureAlgorithm algorithm)Deprecated.default JwtSignatureBuildersignatureKeyId(String keyId)Deprecated.JwtSignatureBuilderthumbprint(X509Certificate cert)Set X.509 Certificate SHA-1 'x5t' thumbprint.JwtSignatureBuilderthumbprintS256(X509Certificate cert)Set X.509 Certificate SHA-256 'x5t#S256' thumbprint.-
Methods inherited from interface io.smallrye.jwt.build.JwtSignature
innerSign, innerSign, innerSign, innerSign, innerSignWithSecret, sign, sign, sign, sign, signWithSecret
-
-
-
-
Method Detail
-
algorithm
JwtSignatureBuilder 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(SignatureAlgorithm algorithm)
Deprecated.Set a signature algorithm. Note that only 'RS256' (default), 'ES256' and 'HS256' algorithms must be supported.- Parameters:
algorithm- the signature algorithm- Returns:
- JwtSignatureBuilder
-
keyId
JwtSignatureBuilder keyId(String 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
JwtSignatureBuilder thumbprint(X509Certificate cert)
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
-
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 theSignatureAlgorithmvalues.- Parameters:
name- the header namevalue- the header value- Returns:
- JwtSignatureBuilder
-
-