object

http_oauth_metadata

OAuth protected-resource metadata document and HTTP response builder following RFC 9728.

Availability:
logtalk_load(http_oauth(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-09-01
Compilation flags:
static, context_switching_calls
Remarks:
(none)

Public predicates

well_known_url/2

Returns the RFC 9728 well-known metadata URL for a canonical protected-resource identifier.

Compilation flags:
static
Template:
well_known_url(ProtectedResource,URL)
Mode and number of proofs:
well_known_url(+atom,-atom) - one_or_error
Exceptions:
ProtectedResource is not a canonical HTTPS protected-resource identifier:
domain_error(http_oauth_protected_resource,ProtectedResource)

document/3

Builds a protected-resource metadata JSON object from descriptor terms.

Compilation flags:
static
Template:
document(ProtectedResource,Descriptors,Document)
Mode and number of proofs:
document(+atom,+list(compound),-term) - one_or_error
Exceptions:
ProtectedResource is not a canonical HTTPS protected-resource identifier:
domain_error(http_oauth_protected_resource,ProtectedResource)
Descriptors is not a proper list:
type_error(list,Descriptors)
An element Descriptor of the list Descriptors is not a valid metadata descriptor:
domain_error(http_oauth_metadata_descriptor,Descriptor)
Descriptors contains duplicate metadata members:
domain_error(http_oauth_metadata_descriptors,Descriptors)

document/4

Builds a protected-resource metadata JSON object subject to profile options.

Compilation flags:
static
Template:
document(ProtectedResource,Descriptors,Document,Options)
Mode and number of proofs:
document(+atom,+list(compound),-term,+list(compound)) - one_or_error
Exceptions:
ProtectedResource is not a canonical HTTPS protected-resource identifier:
domain_error(http_oauth_protected_resource,ProtectedResource)
Descriptors is not a proper list:
type_error(list,Descriptors)
An element Descriptor of the list Descriptors is not a valid metadata descriptor:
domain_error(http_oauth_metadata_descriptor,Descriptor)
Descriptors contains duplicate metadata members:
domain_error(http_oauth_metadata_descriptors,Descriptors)
Options is a variable:
instantiation_error
Options is neither a variable nor a list:
type_error(list,Options)
An element Option of the list Options is a variable:
instantiation_error
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)
Descriptors omits a required metadata member or gives it an empty value:
domain_error(http_oauth_metadata_descriptors,Descriptors)

response/3

Builds a normalized HTTP 200 response containing protected-resource metadata.

Compilation flags:
static
Template:
response(ProtectedResource,Descriptors,Response)
Mode and number of proofs:
response(+atom,+list(compound),-compound) - one_or_error
Exceptions:
ProtectedResource is not a canonical HTTPS protected-resource identifier:
domain_error(http_oauth_protected_resource,ProtectedResource)
Descriptors is not a proper list:
type_error(list,Descriptors)
An element Descriptor of the list Descriptors is not a valid metadata descriptor:
domain_error(http_oauth_metadata_descriptor,Descriptor)
Descriptors contains duplicate metadata members:
domain_error(http_oauth_metadata_descriptors,Descriptors)

response/4

Builds a normalized HTTP 200 metadata response subject to profile options.

Compilation flags:
static
Template:
response(ProtectedResource,Descriptors,Response,Options)
Mode and number of proofs:
response(+atom,+list(compound),-compound,+list(compound)) - one_or_error
Exceptions:
ProtectedResource is not a canonical HTTPS protected-resource identifier:
domain_error(http_oauth_protected_resource,ProtectedResource)
Descriptors is not a proper list:
type_error(list,Descriptors)
An element Descriptor of the list Descriptors is not a valid metadata descriptor:
domain_error(http_oauth_metadata_descriptor,Descriptor)
Descriptors contains duplicate metadata members:
domain_error(http_oauth_metadata_descriptors,Descriptors)
Options is a variable:
instantiation_error
Options is neither a variable nor a list:
type_error(list,Options)
An element Option of the list Options is a variable:
instantiation_error
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)
Descriptors omits a required metadata member or gives it an empty value:
domain_error(http_oauth_metadata_descriptors,Descriptors)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)