Make.Token
Authentication Token for accessing GitLab APIs.
Of the several ways provided in GitLab, we currently support:
val create_url :
client_id:string ->
redirect_uri:Uri.t ->
state:string ->
scopes:Gitlab_t.scope list ->
unit ->
Uri.t
Create URL for Authorisation code flow. https://docs.gitlab.com/ee/api/oauth2.html#authorization-code-flow
val of_code :
client_id:string ->
client_secret:string ->
?grant_type:grant_type ->
redirect_uri:string ->
code:string ->
unit ->
t option Lwt.t
Retrieve an OAuth Token using the default grant_type AuthorizationCode
. Use the refresh_token
along with a grant_type of RefreshToken
to request a refreshed OAuth Token.
val of_string : string -> t
of_string
create an AccessToken
.
val to_string : t -> string
to_string token
is the string serialization of token
.