Package io.smallrye.jwt.build
Interface JwtSignatureBuilder
- All Superinterfaces:
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 Summary
Modifier and TypeMethodDescriptionalgorithm(SignatureAlgorithm algorithm) Set a signature algorithm.default JwtSignatureBuilderchain(X509Certificate cert) Set X.509 Certificate 'x5c' chain.chain(List<X509Certificate> chain) Set X.509 Certificate 'x5c' chain.Custom JWT signature header.Set JSON Web Key 'jwk' key.Set a 'kid' signature key id.default JwtSignatureBuildersignatureAlgorithm(SignatureAlgorithm algorithm) Deprecated.default JwtSignatureBuildersignatureKeyId(String keyId) Deprecated.thumbprint(X509Certificate cert) Set X.509 Certificate SHA-1 'x5t' thumbprint.Set X.509 Certificate SHA-256 'x5t#S256' thumbprint.Set a token type (`typ`) header.Methods inherited from interface io.smallrye.jwt.build.JwtSignature
innerSign, innerSign, innerSign, innerSign, innerSignWithSecret, sign, sign, sign, sign, signWithSecret
-
Method Details
-
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.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.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
Set X.509 Certificate SHA-256 'x5t#S256' thumbprint.- Parameters:
cert- the certificate- Returns:
- JwtSignatureBuilder
-
chain
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
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
-
algorithm(io.smallrye.jwt.algorithm.SignatureAlgorithm)