summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorSteve Abrams <sabrams@gitlab.com>2019-07-22 08:50:25 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-07-22 08:50:25 +0000
commitaba93fe2d5661cf3c086f65838db2965c746fdbf (patch)
treebe934a757b6b0a64391de1d572f54e16f6ffc82e /doc/api
parent30a0d4600e46af1b01f90332679f64c432219d5a (diff)
downloadgitlab-ce-aba93fe2d5661cf3c086f65838db2965c746fdbf.tar.gz
OAuth2 support for GitLab personal access tokens
PATs are accepted using the OAuth2 compliant header "Authorization: Bearer {token}" in order to allow for OAuth requests while 2FA is enabled.
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/README.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/README.md b/doc/api/README.md
index 8e60d1c61df..f9cc1a09870 100644
--- a/doc/api/README.md
+++ b/doc/api/README.md
@@ -272,6 +272,12 @@ Example of using the personal access token in a header:
curl --header "Private-Token: <your_access_token>" https://gitlab.example.com/api/v4/projects
```
+You can also use personal access tokens with OAuth-compliant headers:
+
+```shell
+curl --header "Authorization: Bearer <your_access_token>" https://gitlab.example.com/api/v4/projects
+```
+
Read more about [personal access tokens][pat].
### Session cookie