diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /doc/api/oauth2.md | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'doc/api/oauth2.md')
-rw-r--r-- | doc/api/oauth2.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/oauth2.md b/doc/api/oauth2.md index cc8b31ecf17..5fbb7913ff4 100644 --- a/doc/api/oauth2.md +++ b/doc/api/oauth2.md @@ -61,7 +61,7 @@ The web application flow is: include the GET `code` parameter, for example: ```plaintext - http://myapp.com/oauth/redirect?code=1234567890&state=YOUR_UNIQUE_STATE_HASH + https://example.com/oauth/redirect?code=1234567890&state=YOUR_UNIQUE_STATE_HASH ``` You should then use `code` to request an access token. @@ -72,7 +72,7 @@ The web application flow is: ```ruby parameters = 'client_id=APP_ID&client_secret=APP_SECRET&code=RETURNED_CODE&grant_type=authorization_code&redirect_uri=REDIRECT_URI' - RestClient.post 'http://gitlab.example.com/oauth/token', parameters + RestClient.post 'https://gitlab.example.com/oauth/token', parameters ``` Example response: @@ -125,7 +125,7 @@ will include a fragment with `access_token` as well as token details in GET parameters, for example: ```plaintext -http://myapp.com/oauth/redirect#access_token=ABCDExyz123&state=YOUR_UNIQUE_STATE_HASH&token_type=bearer&expires_in=3600 +https://example.com/oauth/redirect#access_token=ABCDExyz123&state=YOUR_UNIQUE_STATE_HASH&token_type=bearer&expires_in=3600 ``` ### Resource owner password credentials flow @@ -198,7 +198,7 @@ By default, the scope of the access token is `api`, which provides complete read For testing, you can use the `oauth2` Ruby gem: ```ruby -client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com") +client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "https://example.com") access_token = client.password.get_token('user@example.com', 'secret') puts access_token.token ``` |