category

# `http_router_basic_auth(Verifier,BaseOptions)`

- `Verifier` - Verifier object passed to `http_authenticate::protect_request/4` when a routed request declares Basic auth metadata.

- `BaseOptions` - Base protect-request options merged with any route-specific `basic_auth/1` metadata options.

Optional Basic-auth router helpers for objects importing the `http_router` category.

Availability:
`logtalk_load(http_authenticate(loader))`
Author: Paulo Moura
Version: 1:0:0
Date: 2026-06-26
Compilation flags:
`static`
Uses:
http_authenticate
http_core
list
Remarks:
(none)
Inherited public predicates:
(none)

## Public predicates

(no local declarations; see entity ancestors if any)

## Protected predicates

### `authorize_basic_auth_request/2`

Router helper that applies Basic-auth route metadata to a routed request and returns either `continue(Request)` or `respond(Response)`.

Compilation flags:
`static`
Template:
`authorize_basic_auth_request(Request,Action)`
Mode and number of proofs:
`authorize_basic_auth_request(+compound,-compound)` - `one_or_error`
Exceptions:
Route metadata options are not a proper list:
`domain_error(http_router_basic_auth_options,Options)`
`Request` is not a valid normalized HTTP request term:
`domain_error(http_request,Request)`
The Basic verifier object is invalid:
`domain_error(http_authenticate_verifier,Verifier)`
The Basic verifier object does not exist:
`existence_error(http_authenticate_verifier,Verifier)`
The Basic-auth protection options are invalid:
`domain_error(option,Option)`
The Basic-auth status is invalid:
`domain_error(http_authenticate_status,Status)`

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)