object
http_digest
HTTP Digest authentication parsing, generation, request decoration, and verification helpers.
logtalk_load(http_digest(loader))static, context_switching_callsPublic predicates
challenge/2
Returns the single parsed Digest WWW-Authenticate challenge from a normalized HTTP response when present.
staticchallenge(Response,Challenge)challenge(+compound,-compound) - zero_or_oneauthentication_info/2
Returns the parsed Authentication-Info header from a normalized HTTP response when present.
staticauthentication_info(Response,AuthenticationInfo)authentication_info(+compound,-compound) - zero_or_oneparse_challenge/2
Parses one Digest challenge header field value into a normalized digest_challenge/1 term.
staticparse_challenge(Text,Challenge)parse_challenge(++text,-compound) - one_or_errorText is neither a variable nor text:type_error(text,Text)Text is not a valid Digest challenge header value:domain_error(http_digest_header(www_authenticate),invalid(syntax))Text uses an unsupported authentication scheme:domain_error(http_digest_header(www_authenticate),unsupported_scheme(Scheme))Text contains a duplicated Digest challenge directive:domain_error(http_digest_header(www_authenticate),duplicate(Name))Text contains an unexpected Digest challenge directive:domain_error(http_digest_header(www_authenticate),unexpected(Name))Text is missing a required Digest challenge directive:domain_error(http_digest_header(www_authenticate),missing(Name))Text contains an invalid Digest challenge directive value:domain_error(http_digest_header(www_authenticate),invalid(Name))generate_challenge/2
Generates one canonical Digest challenge header field value from a normalized digest_challenge/1 term.
staticgenerate_challenge(Challenge,HeaderValue)generate_challenge(+compound,-atom) - one_or_errorChallenge is not a valid normalized Digest challenge term:domain_error(http_digest_term(challenge),Challenge)Challenge is missing a required field:domain_error(http_digest_term(challenge),missing(Name))Challenge contains a duplicated field:domain_error(http_digest_term(challenge),duplicate(Name))Challenge contains an unexpected field:domain_error(http_digest_term(challenge),unexpected(Name))Challenge contains an invalid field:domain_error(http_digest_term(challenge),invalid(Name))Challenge fields are not in canonical order:domain_error(http_digest_term(challenge),invalid_order)Challenge contains an invalid algorithm:domain_error(http_digest_algorithm,Algorithm)Challenge contains an invalid qop value:domain_error(http_digest_qop,Qop)Challenge contains an invalid charset:domain_error(http_digest_charset,Charset)parse_authentication_info/2
Parses one Authentication-Info header field value into a normalized digest_authentication_info/1 term.
staticparse_authentication_info(Text,AuthenticationInfo)parse_authentication_info(++text,-compound) - one_or_errorText is neither a variable nor text:type_error(text,Text)Text is not a valid Digest Authentication-Info header value:domain_error(http_digest_header(authentication_info),invalid(syntax))Text contains a duplicated Digest authentication-info directive:domain_error(http_digest_header(authentication_info),duplicate(Name))Text contains an unexpected Digest authentication-info directive:domain_error(http_digest_header(authentication_info),unexpected(Name))Text contains an invalid Digest authentication-info directive value:domain_error(http_digest_header(authentication_info),invalid(Name))generate_authentication_info/2
Generates one canonical Authentication-Info header field value from a normalized digest_authentication_info/1 term.
staticgenerate_authentication_info(AuthenticationInfo,HeaderValue)generate_authentication_info(+compound,-atom) - one_or_errorAuthenticationInfo is not a valid normalized Digest authentication-info term:domain_error(http_digest_term(authentication_info),AuthenticationInfo)AuthenticationInfo contains no field to generate:domain_error(http_digest_term(authentication_info),missing(all))AuthenticationInfo contains a duplicated field:domain_error(http_digest_term(authentication_info),duplicate(Name))AuthenticationInfo contains an unexpected field:domain_error(http_digest_term(authentication_info),unexpected(Name))AuthenticationInfo contains an invalid field:domain_error(http_digest_term(authentication_info),invalid(Name))AuthenticationInfo fields are not in canonical order:domain_error(http_digest_term(authentication_info),invalid_order)AuthenticationInfo contains inconsistent qop, nonce-count, and cnonce fields:domain_error(http_digest_term(authentication_info),inconsistent(qop_nonce_count_cnonce))protect_request/4
Verifies a normalized HTTP request using a Digest verifier object and returns either continue(Request) or respond(Response).
staticprotect_request(Request,Verifier,Action,Options)protect_request(+compound,+object_identifier,-compound,+list(compound)) - one_or_errorRequest is not a valid normalized HTTP request term:domain_error(http_request,Request)Verifier is a variable:instantiation_errorVerifier is neither a variable nor an existing object:existence_error(http_digest_verifier,Verifier)Verifier does not implement the Digest verifier protocol:domain_error(http_digest_verifier,Verifier)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Options contains an invalid Digest protection option:domain_error(http_digest_protect_request_option,Option)Options is missing a required Digest protection option:domain_error(http_digest_protect_request_option,Option)Options contains an invalid Digest status:domain_error(http_digest_status,Status)Options contains an invalid Digest algorithm:domain_error(http_digest_algorithm,Algorithm)Options contains an invalid Digest qop value:domain_error(http_digest_qop,Qop)Options contains an invalid Digest charset:domain_error(http_digest_charset,Charset)add_authentication_info/4
Decorates a normalized HTTP response with an Authentication-Info header computed from a previously verified request and options. The nextnonce option accepts false to omit the field, true to generate a fresh nonce using nonce_secret/1, or an explicit nonce atom to emit verbatim.
staticadd_authentication_info(Request,Response0,Response,Options)add_authentication_info(+compound,+compound,-compound,+list(compound)) - one_or_errorRequest is not a valid normalized HTTP request term:domain_error(http_request,Request)Request is not annotated with a verified Digest property:domain_error(http_digest_verified_request,missing(Property))Response0 is not a valid normalized HTTP response term:domain_error(http_response,Response0)Options is a variable or a partial list:instantiation_errorOptions is neither a variable nor a list:type_error(list,Options)Option of the list Options is neither a variable nor a compound term:type_error(compound,Option)Option of the list Options is a compound term but not a valid option:domain_error(option,Option)Options contains an invalid authentication-info option:domain_error(http_digest_add_authentication_info_option,Option)Options is missing a required authentication-info option:domain_error(http_digest_add_authentication_info_option,Option)domain_error(http_header_semantics,Header)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)