package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.std/B0_github/Auth/index.html

Module B0_github.AuthSource

Authentication.

Sourcetype t

The type for GitHub authentication.

Sourceval make : user:string option -> unit -> (t, string) result

make ~http ~user () determines authentication via personal access token for user user. It the latter is unspecified it first looks up the contents of the B0_GITHUB_TOKEN environment variable if that fails it looks up for an existing token in the B0_std.Os.Dir.config () /b0/github/$USER.token file. If that fails instructions are printed on how to setup the token.

Sourceval user : t -> string

user a is the GitHub user.

Sourceval token : t -> string

token a is the Github token.

Command line interface

Sourceval user_env : string

user_env is "B0_GITHUB_USER".

Sourceval token_env : string

user_env is "B0_GITHUB_TOKEN".

envs describe user_env and token_env.

Sourceval cli : ?opts:string list -> unit -> (t, string) result Cmdliner.Term.t

cli () is a command line interface for GitHub authentication. opts are the options that can be used for specifiying the github user (defaults to ["u";"github"])