Module Token.Request

Types and functions to work with the token endpoint

type t = {
  1. grant_type : string;
  2. scope : Scopes.t list;
  3. code : string;
  4. client_id : string;
  5. client_secret : string option;
  6. redirect_uri : Uri.t;
}

A refresh token request

val make : grant_type:string -> scope:Scopes.t list -> redirect_uri:Uri.t -> code:string -> Client.t -> t
val to_body_string : t -> string

Creates the body for the token request

val of_body_string : string -> (t, [> `Msg of string ]) Stdlib.result

Parses a request body into a t