Spindle_http.AuthAuthentication, as RFC 9110 §11 writes it: the credentials a request carries in Authorization or Proxy-Authorization, and the challenges a 401 or a 407 names in WWW-Authenticate or Proxy-Authenticate.
Auth.credentials "Bearer mF_9.B5f-4.1JqM"
= Ok { scheme = "bearer"; value = Token68 "mF_9.B5f-4.1JqM" }val credentials : string -> (t, string) Stdlib.resultThe credentials in an Authorization value; a parameter given twice is an Error (RFC 9110 §11.2), in words for a log, and never quoting the value, which is a secret.
val challenges : string -> (t list, string) Stdlib.resultEvery challenge in a WWW-Authenticate value, in order: a parameter belongs to the challenge before it, so a comma inside a quoted string, or between one challenge's parameters, does not start another; a challenge naming a parameter twice is an Error.
val to_string : t -> (string, string) Stdlib.resultThe scheme, then its token or its parameters, a value a quoted string where it is no token: what a server writes as a challenge and a client as credentials. credentials and challenges read it back as itself, and what they would not -- a scheme or a name that is no token or is not lower-cased, a parameter twice, a token that is no token68 -- is an Error, which quotes nothing of the value.