object
http_oauth
OAuth Bearer parsing, challenge, authentication, authorization, and response helpers.
logtalk_load(http_oauth(loader))static, context_switching_callsPublic predicates
challenge/2
Returns the single parsed Bearer challenge from a normalized HTTP response. Fails when the response contains no Bearer WWW-Authenticate header field.
staticchallenge(Response,Challenge)challenge(+compound,-compound) - zero_or_one_or_errorResponse is not a valid normalized HTTP response term:domain_error(http_response,Response)Response contains multiple Bearer WWW-Authenticate header values Values:domain_error(http_oauth_header_values(www_authenticate),Values)WWW-Authenticate header field uses unsupported authentication scheme Scheme:domain_error(http_oauth_bearer_scheme,Scheme)WWW-Authenticate header field value Value has invalid syntax:domain_error(http_oauth_header(www_authenticate),Value)WWW-Authenticate header field value Value contains invalid or duplicate parameters:domain_error(http_oauth_challenge_parameters,Value)WWW-Authenticate header field contains invalid scope value Scope:domain_error(http_oauth_scope,Scope)WWW-Authenticate header field contains invalid parameter name Name:domain_error(http_authentication_parameter_name,Name)parse_challenge/2
Parses a Bearer challenge header value.
staticparse_challenge(Text,Challenge)parse_challenge(++text,-compound) - one_or_errorText is a variable:instantiation_errorText is neither a variable nor text:type_error(text,Text)Text uses unsupported authentication scheme Scheme:domain_error(http_oauth_bearer_scheme,Scheme)Text is not a valid Bearer challenge header value:domain_error(http_oauth_header(www_authenticate),Text)Text contains invalid or duplicate Bearer challenge parameters:domain_error(http_oauth_challenge_parameters,Text)Text contains invalid Bearer scope value Scope:domain_error(http_oauth_scope,Scope)Text contains invalid Bearer challenge parameter name Name:domain_error(http_authentication_parameter_name,Name)generate_challenge/2
Generates a Bearer challenge header value.
staticgenerate_challenge(Challenge,HeaderValue)generate_challenge(+compound,-atom) - one_or_errorChallenge is not a valid normalized Bearer challenge term or contains duplicate fields:domain_error(http_oauth_term(challenge),Challenge)authenticate_request/4
Authenticates a normalized request, returning continue(AnnotatedRequest) or respond(Response).
staticauthenticate_request(Request,Verifier,Action,Options)authenticate_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 does not name an existing object:existence_error(http_oauth_verifier,Verifier)Verifier does not implement http_oauth_verifier_protocol:domain_error(http_oauth_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 a variable:instantiation_errorOption 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)ScopeChecker selected by Options does not name an existing object:existence_error(http_oauth_scope_checker,ScopeChecker)ScopeChecker selected by Options does not implement http_oauth_scope_checker_protocol:domain_error(http_oauth_scope_checker,ScopeChecker)Options omits a protected-resource identifier:domain_error(http_oauth_protection_options,Options)Verifier returns malformed normalized token information TokenInfo:domain_error(http_oauth_token_info,TokenInfo)Properties are invalid:domain_error(http_properties,Properties)Header violates normalized HTTP response semantics:domain_error(http_header_semantics,Header)Property violates normalized HTTP response semantics:domain_error(http_property_semantics,Property)protect_request/4
Authenticates and authorizes a normalized request.
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 does not name an existing object:existence_error(http_oauth_verifier,Verifier)Verifier does not implement http_oauth_verifier_protocol:domain_error(http_oauth_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 a variable:instantiation_errorOption 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)ScopeChecker selected by Options does not name an existing object:existence_error(http_oauth_scope_checker,ScopeChecker)ScopeChecker selected by Options does not implement http_oauth_scope_checker_protocol:domain_error(http_oauth_scope_checker,ScopeChecker)Options omits a protected-resource identifier:domain_error(http_oauth_protection_options,Options)Verifier returns malformed normalized token information TokenInfo:domain_error(http_oauth_token_info,TokenInfo)Properties are invalid:domain_error(http_properties,Properties)Header violates normalized HTTP response semantics:domain_error(http_header_semantics,Header)Property violates normalized HTTP response semantics:domain_error(http_property_semantics,Property)token_info/2
Returns normalized OAuth token information from an authenticated request.
statictoken_info(Request,TokenInfo)token_info(+compound,-compound) - zero_or_onescopes/2
Returns granted OAuth scopes from an authenticated request.
staticscopes(Request,Scopes)scopes(+compound,-list(atom)) - zero_or_oneforbidden_response/3
Builds a normalized 403 response and its Bearer challenge.
staticforbidden_response(Challenge,Response,Options)forbidden_response(-compound,-compound,+list(compound)) - one_or_errorOptions 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 a variable:instantiation_errorOption 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)ScopeChecker selected by Options does not name an existing object:existence_error(http_oauth_scope_checker,ScopeChecker)ScopeChecker selected by Options does not implement http_oauth_scope_checker_protocol:domain_error(http_oauth_scope_checker,ScopeChecker)Properties are invalid:domain_error(http_properties,Properties)Header violates normalized HTTP response semantics:domain_error(http_header_semantics,Header)Property violates normalized HTTP response semantics:domain_error(http_property_semantics,Property)forbidden_response/4
Decorates a normalized response as a 403 Bearer response.
staticforbidden_response(Challenge,Response0,Response,Options)forbidden_response(+compound,+compound,-compound,+list(compound)) - one_or_errorChallenge is not a valid normalized Bearer challenge term or contains duplicate fields:domain_error(http_oauth_term(challenge),Challenge)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 a variable:instantiation_errorOption 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)ScopeChecker selected by Options does not name an existing object:existence_error(http_oauth_scope_checker,ScopeChecker)ScopeChecker selected by Options does not implement http_oauth_scope_checker_protocol:domain_error(http_oauth_scope_checker,ScopeChecker)Properties are invalid:domain_error(http_properties,Properties)Header violates normalized HTTP response semantics:domain_error(http_header_semantics,Header)Property violates normalized HTTP response semantics:domain_error(http_property_semantics,Property)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)