package gemini

  1. Overview
  2. Docs

Module Gemini.AuthSource

Sourcetype t = [
  1. | `Base64 of Cstruct.t
  2. | Hex.t
]

An authentication token type.

Sourceval of_payload : string -> [< t Base64 ]

Given a base64 payload, produce an authentication token.

Sourceval hmac_sha384 : api_secret:string -> [< `Base64 of Cstruct.t ] -> Hex.t
Sourceval to_string : [< `Base64 of Cstruct.t & Cstruct.t & Cstruct.t | `Hex of string & string & string ] -> string

Produce a string representation of the authentication token.

Sourceval to_headers : (module Cfg.S) -> [< `Base64 of Cstruct.t ] -> Cohttp.Header.t

Encode an authentication token as a gemini payload with an http header encoding. Use module Cfg to determine secrets and the api target.