Commit 5838d1ba authored by Valery Sizov's avatar Valery Sizov

Fix a confusion in OAuth2 documentation

parent f4ded8a8
# GitLab as an OAuth2 client # GitLab as an OAuth2 provider
This document covers using the OAuth2 protocol to access GitLab. This document covers using the OAuth2 protocol to access GitLab.
...@@ -112,7 +112,7 @@ You can do POST request to `/oauth/token` with parameters: ...@@ -112,7 +112,7 @@ You can do POST request to `/oauth/token` with parameters:
{ {
"grant_type" : "password", "grant_type" : "password",
"username" : "user@example.com", "username" : "user@example.com",
"password" : "sekret" "password" : "secret"
} }
``` ```
...@@ -130,7 +130,7 @@ For testing you can use the oauth2 ruby gem: ...@@ -130,7 +130,7 @@ For testing you can use the oauth2 ruby gem:
``` ```
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 => "http://example.com")
access_token = client.password.get_token('user@example.com', 'sekret') access_token = client.password.get_token('user@example.com', 'secret')
puts access_token.token puts access_token.token
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment