verifyWith
Configures the parser to verify JWS signatures using an HMAC key derived from the given Jwk.Oct JWK.
Return
this builder for chaining
Parameters
the HMAC-based signing algorithm (HS256, HS384, or HS512)
the Oct JWK containing the raw symmetric key material
optional key ID override; when set, the parser will only use this key if the token's kid header matches. Defaults to the JWK's own kid field.
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Configures the parser to verify JWS signatures using an RSA PKCS#1 public key derived from the given Jwk.Rsa JWK.
Return
this builder for chaining
Parameters
the RSA PKCS#1-based signing algorithm (RS256, RS384, or RS512)
the RSA JWK containing the public key parameters n and e
optional key ID override; when set, the parser will only use this key if the token's kid header matches. Defaults to the JWK's own kid field.
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Configures the parser to verify JWS signatures using an RSA PSS public key derived from the given Jwk.Rsa JWK.
Return
this builder for chaining
Parameters
the RSA PSS-based signing algorithm (PS256, PS384, or PS512)
the RSA JWK containing the public key parameters n and e
optional key ID override; when set, the parser will only use this key if the token's kid header matches. Defaults to the JWK's own kid field.
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Configures the parser to verify JWS signatures using an ECDSA public key derived from the given Jwk.Ec JWK.
Return
this builder for chaining
Parameters
the ECDSA-based signing algorithm (ES256, ES384, or ES512)
the EC JWK containing the public key parameters crv, x, and y
optional key ID override; when set, the parser will only use this key if the token's kid header matches. Defaults to the JWK's own kid field.
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Registers an HMAC (HS256/384/512) symmetric key for JWS signature verification.
Return
this builder for chaining
Parameters
the HMAC-based signing algorithm (HS256, HS384, or HS512)
the HMAC symmetric key to verify signatures with
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
Registers an RSA PKCS#1 (RS256/384/512) public key for JWS signature verification.
Return
this builder for chaining
Parameters
the RSA PKCS#1-based signing algorithm (RS256, RS384, or RS512)
the RSA PKCS#1 public key to verify signatures with
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
Registers an RSA PSS (PS256/384/512) public key for JWS signature verification.
Return
this builder for chaining
Parameters
the RSA PSS-based signing algorithm (PS256, PS384, or PS512)
the RSA PSS public key to verify signatures with
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
Registers an ECDSA (ES256/384/512) public key for JWS signature verification.
Return
this builder for chaining
Parameters
the ECDSA-based signing algorithm (ES256, ES384, or ES512)
the ECDSA public key to verify signatures with
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
Registers a raw Key for JWS signature verification using any SigningAlgorithm.
Prefer the strongly typed overloads (e.g. verifyWith accepting HMAC.Key or RSA.PKCS1.PublicKey) when possible, as they enforce the correct key type at compile time.
Return
this builder for chaining
Parameters
the JWS signing algorithm this key is associated with
the raw cryptography-kotlin key to verify signatures with; must be compatible with algorithm
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
Registers a pre-built SigningKey.VerifyOnlyKey for JWS signature verification.
The algorithm and kid are taken from key's SigningKey.Identifier.
Return
this builder for chaining
Parameters
the verify-only signing key to register
Registers a pre-built SigningKey.SigningKeyPair for JWS signature verification.
The algorithm and kid are taken from key's SigningKey.Identifier. Both the public and private key material are stored, but only the public key is used for verification.
Return
this builder for chaining
Parameters
the signing key pair to register
Registers an HMAC verification key decoded from a String.
Return
this builder for chaining.
Parameters
the HMAC-based signing algorithm (HS256, HS384, or HS512).
the HMAC key material encoded as a String.
the format in which key is encoded.
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Registers an RSA PKCS#1 public key decoded from a String for JWS signature verification.
Return
this builder for chaining.
Parameters
the RSA PKCS#1-based signing algorithm (RS256, RS384, or RS512).
the RSA public key material encoded as a String.
the format in which key is encoded.
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Registers an RSA PSS public key decoded from a String for JWS signature verification.
Return
this builder for chaining.
Parameters
the RSA PSS-based signing algorithm (PS256, PS384, or PS512).
the RSA public key material encoded as a String.
the format in which key is encoded.
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default
Registers an ECDSA public key decoded from a String for JWS signature verification.
Return
this builder for chaining.
Parameters
the ECDSA-based signing algorithm (ES256, ES384, or ES512).
the EC public key material encoded as a String.
the format in which key is encoded.
optional key ID to associate with this verifier; when set, only tokens whose kid header matches will use this key. Defaults to null (matches any token).
the CryptographyProvider used to decode the key; defaults to CryptographyProvider.Default