Skip to content

Support for OAuth2 access tokens in addition to personal access tokens

Miha Čančula requested to merge miha.cancula/rust-gitlab:master into master

Adds support for OAuth2 tokens obtained through the OAuth2 flow.

I did not change existing API, so no code changes are needed to keep using the personal access tokens. This change adds a new set of constructors (with_oauth2 and with_oauth2_insecure) and a new method to the builder struct (oauth2_token). The new APIs are documented.

Internally, a private enum is used to store the token type.

Fixes issue #19 (closed)

Merge request reports