Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Authorization code flow in OAuth. #30

Merged
merged 3 commits into from
Jan 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
- macos-11
- ubuntu-20.04
- windows-2019

ocaml-compiler:
- 4.08.x
- 4.09.x
- 4.10.x
- 4.11.x
# - 4.09.x
# - 4.10.x
# - 4.11.x
- 4.12.x
- 4.13.x

Expand Down
2 changes: 1 addition & 1 deletion cli/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let from_file () =
| Ok toml ->
let user = Otoml.(find toml get_string [ "gitlab.com"; "user" ])
and token' = Otoml.(find toml get_string [ "gitlab.com"; "token" ]) in
{ token = Gitlab.Token.of_string token'; user }
{ token = Gitlab.Token.AccessToken token'; user }
| Error err ->
Printf.eprintf "Missing lab configuration file at ~/.config/lab";
raise (Config err)
8 changes: 8 additions & 0 deletions lib/gitlab.atd
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,14 @@ type scope = [
| WriteRepository <json name="write_repository">
]

type auth = {
access_token: string;
token_type: string;
expires_in: int;
refresh_token: string;
created_at: int;
}

type personal_access_token = {
id: int;
name: string;
Expand Down
Loading