diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-10 15:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-10 15:09:14 +0300 |
commit | 152b3268d701b54cac9b615a0e29e0e5726bfd99 (patch) | |
tree | deb2e10bd5aa7c5fd54988fb8bc2ca9ec819c0b2 /doc/api/oauth2.md | |
parent | 921173681c207356914a35ea3dca1afffeac8b05 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/oauth2.md')
-rw-r--r-- | doc/api/oauth2.md | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/api/oauth2.md b/doc/api/oauth2.md index ab106b4fb44..2bcf86a031c 100644 --- a/doc/api/oauth2.md +++ b/doc/api/oauth2.md @@ -270,13 +270,18 @@ the following parameters: } ``` -Also you must use HTTP Basic authentication using the `client_id` and`client_secret` -values to authenticate the client that performs a request. - Example cURL request: ```shell echo 'grant_type=password&username=<your_username>&password=<your_password>' > auth.txt +curl --data "@auth.txt" --request POST "https://gitlab.example.com/oauth/token" +``` + +You can also use this grant flow with registered OAuth applications, by using +HTTP Basic Authentication with the application's `client_id` and `client_secret`: + +```shell +echo 'grant_type=password&username=<your_username>&password=<your_password>' > auth.txt curl --data "@auth.txt" --user client_id:client_secret --request POST "https://gitlab.example.com/oauth/token" ``` |