Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-21 21:10:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-21 21:10:24 +0300
commit77d6584e99881088ada2078703e1501c629aea54 (patch)
tree2c4fbeab4746e8f01e33264a80f681dad61fc150 /doc/api/oauth2.md
parentd5098d9fe3a5f05d9b90996851ab753f8b40cf65 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/oauth2.md')
-rw-r--r--doc/api/oauth2.md8
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
```