Module Token.Request

Types and functions to work with the token endpoint

type t = {
grant_type : string;
scope : Scopes.t list;
code : string;
client_id : string;
client_secret : string option;
redirect_uri : Uri.t;
}

A token request

val make : client:Client.t -> grant_type:string -> scope:Scopes.t list -> redirect_uri:Uri.t -> code:string -> 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

Notes

The Authorization Server MUST validate the Token Request as follows: