Support OAuth2 tokens in addition to Private tokens
Although the documentation doesn't mention it, the tokens passed to Gitlab::new()
are assumed to be Personal access tokens, passed with the Private-Token
header.
As a prospective user of this library I would prefer using OAuth2 tokens. They are used in much the same way, except the header name is Authorization
. I don't really care if the Bearer
part is added inside this library or if I have to add it to the token myself, as long as the behavior is known.
I am willing to provide a PR if this is something you wish to support.