Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
effc6c17
Commit
effc6c17
authored
Dec 19, 2016
by
Mehdy Khoshnoody
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oauth2.md: should use the provider's URL which is gitlab.example.com
parent
a50cd9eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
doc/api/oauth2.md
doc/api/oauth2.md
+3
-3
No files found.
doc/api/oauth2.md
View file @
effc6c17
...
@@ -57,7 +57,7 @@ Once you have the authorization code you can request an `access_token` using the
...
@@ -57,7 +57,7 @@ Once you have the authorization code you can request an `access_token` using the
```
```
parameters = 'client_id=APP_ID&client_secret=APP_SECRET&code=RETURNED_CODE&grant_type=authorization_code&redirect_uri=REDIRECT_URI'
parameters = 'client_id=APP_ID&client_secret=APP_SECRET&code=RETURNED_CODE&grant_type=authorization_code&redirect_uri=REDIRECT_URI'
RestClient.post 'http://
localhost:3000
/oauth/token', parameters
RestClient.post 'http://
gitlab.example.com
/oauth/token', parameters
# The response will be
# The response will be
{
{
...
@@ -77,13 +77,13 @@ You can now make requests to the API with the access token returned.
...
@@ -77,13 +77,13 @@ You can now make requests to the API with the access token returned.
The access token allows you to make requests to the API on a behalf of a user.
The access token allows you to make requests to the API on a behalf of a user.
```
```
GET https://
localhost:3000
/api/v3/user?access_token=OAUTH-TOKEN
GET https://
gitlab.example.com
/api/v3/user?access_token=OAUTH-TOKEN
```
```
Or you can put the token to the Authorization header:
Or you can put the token to the Authorization header:
```
```
curl --header "Authorization: Bearer OAUTH-TOKEN" https://
localhost:3000
/api/v3/user
curl --header "Authorization: Bearer OAUTH-TOKEN" https://
gitlab.example.com
/api/v3/user
```
```
## Resource Owner Password Credentials
## Resource Owner Password Credentials
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment