object
jwt_jwa
JSON Web Algorithm metadata and header helpers.
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
header_algorithm/2
Extracts and validates the JWT header algorithm.
Compilation flags:
staticTemplate:
header_algorithm(Header,Algorithm)Mode and number of proofs:
header_algorithm(+term,-atom) - one_or_errorExceptions:
Header does not contain a valid alg member:domain_error(jwt_header,Header)header_key_id/2
Extracts the optional key identifier from a JWT header.
Compilation flags:
staticTemplate:
header_key_id(Header,KeyId)Mode and number of proofs:
header_key_id(+term,-atom) - zero_or_onevalidate_header/1
Validates a JWT header object and rejects unsupported critical header parameters.
Compilation flags:
staticTemplate:
validate_header(Header)Mode and number of proofs:
validate_header(+term) - one_or_errorExceptions:
Header is not a JSON object, contains duplicate member names, or contains unsupported critical header parameters:domain_error(jwt_header,Header)allowed_algorithm/2
Validates that an algorithm is supported and allowed by the options.
Compilation flags:
staticTemplate:
allowed_algorithm(Algorithm,Options)Mode and number of proofs:
allowed_algorithm(+atom,+list(compound)) - one_or_errorExceptions:
Algorithm is unsupported or disallowed by Options:domain_error(jwt_algorithm,Algorithm)supported_algorithm/1
Succeeds when the algorithm is supported by this library.
Compilation flags:
staticTemplate:
supported_algorithm(Algorithm)Mode and number of proofs:
supported_algorithm(+atom) - zero_or_onekey_type/2
Maps a supported algorithm to the required JWK key type.
Compilation flags:
staticTemplate:
key_type(Algorithm,KeyType)Mode and number of proofs:
key_type(+atom,-atom) - zero_or_onehmac_hash/2
Maps a supported HMAC algorithm to its hash object.
Compilation flags:
staticTemplate:
hmac_hash(Algorithm,Hash)Mode and number of proofs:
hmac_hash(+atom,-object_identifier) - zero_or_oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)