object
jwt_jws
JWS signing input construction and signature algorithm dispatch.
Availability:
logtalk_load(jwt(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-07-06
Compilation flags:
static, context_switching_callsRemarks:
(none)
Inherited public predicates:
Public predicates
verify/5
Verifies a JWS signature for a signing input, algorithm, key, and options.
Compilation flags:
staticTemplate:
verify(Algorithm,SigningInput,Signature,Key,Options)Mode and number of proofs:
verify(+atom,+atom,+list(byte),+term,+list(compound)) - zero_or_one_or_errorExceptions:
Algorithm is unsupported:domain_error(jwt_algorithm,Algorithm)Key is not a valid symmetric key:domain_error(jwt_symmetric_key,Key)Key is not a supported public JWK:domain_error(jwt_jwk_public_key,Key)Signature is not a 64-byte raw ES256 signature:domain_error(jwt_es256_signature,Signature)The OpenSSL executable does not exist:
existence_error(os_command,Executable)sign/5
Signs claims as a compact JWT using the given header, key, and options.
Compilation flags:
staticTemplate:
sign(Header,Claims,Key,Token,Options)Mode and number of proofs:
sign(+term,+term,+term,-atom,+list(compound)) - one_or_errorExceptions:
Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)An element
Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)An element
Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Header does not contain a valid alg member:domain_error(jwt_header,Header)The JWT algorithm is unsupported or disallowed:
domain_error(jwt_algorithm,Algorithm)Header or Claims cannot be encoded as JSON:domain_error(json_sink,HeaderOrClaims)Key is not a valid symmetric key:domain_error(jwt_symmetric_key,Key)Algorithm is not a supported signing algorithm:domain_error(jwt_signing_algorithm,Algorithm)sign_payload/5
Signs a payload JSON term as a compact JWS using the given header, key, and options.
Compilation flags:
staticTemplate:
sign_payload(Header,Payload,Key,Token,Options)Mode and number of proofs:
sign_payload(+term,+term,+term,-atom,+list(compound)) - one_or_errorExceptions:
Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)An element
Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)An element
Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Header does not contain a valid alg member:domain_error(jwt_header,Header)The JWT algorithm is unsupported or disallowed:
domain_error(jwt_algorithm,Algorithm)Header or Payload cannot be encoded as JSON:domain_error(json_sink,HeaderOrPayload)Key is not a valid symmetric key:domain_error(jwt_symmetric_key,Key)Algorithm is not a supported signing algorithm:domain_error(jwt_signing_algorithm,Algorithm)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)