package opium

  1. Overview
  2. Docs

Authentication functions to work with common HTTP authentication methods.

module Challenge : sig ... end
module Credential : sig ... end

string_of_credential

val string_of_credential : Credential.t -> string

string_of_credential cred converts the credentials into a string usable in the Authorization header.

credential_of_string

val credential_of_string : string -> Credential.t

credential_of_string s parses a string from the Authorization header into credentials.

string_of_challenge

val string_of_challenge : Challenge.t -> string

string_of_challenge challenge converts the challenge into a string usable in the WWW-Authenticate response header.