package gapi-ocaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Stores data used to authorize requests.

type oauth1_data = {
  1. signature_method : GapiCore.SignatureMethod.t;
  2. consumer_key : string;
  3. consumer_secret : string;
  4. token : string;
  5. secret : string;
}
type oauth1_params = {
  1. http_method : GapiCore.HttpMethod.t;
  2. url : string;
  3. post_fields_to_sign : (string * string) list;
}
type oauth2_data = {
  1. client_id : string;
  2. client_secret : string;
  3. oauth2_token : string;
  4. refresh_token : string;
  5. refresh_access_token : (unit -> string) option;
}
type oauth2_service_account_data = {
  1. service_account_credentials_json : string;
  2. scopes : string list;
  3. user_to_impersonate : string option;
  4. oauth2_service_account_token : string;
  5. refresh_service_account_access_token : (unit -> string) option;
}
type authentication =
  1. | NoAuth
  2. | ClientLogin of string
  3. | OAuth1 of oauth1_data
  4. | OAuth2 of oauth2_data
  5. | OAuth2ServiceAccount of oauth2_service_account_data
val generate_authorization_header : ?oauth1_params:oauth1_params -> authentication -> string option