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
f73ad313
Commit
f73ad313
authored
Jul 27, 2019
by
Ben Bodenmiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add requesting particular OAuth2 scopes details
parent
7dccb444
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
doc/api/oauth2.md
doc/api/oauth2.md
+12
-6
No files found.
doc/api/oauth2.md
View file @
f73ad313
...
@@ -50,11 +50,14 @@ The web application flow is:
...
@@ -50,11 +50,14 @@ The web application flow is:
`/oauth/authorize`
endpoint with the following GET parameters:
`/oauth/authorize`
endpoint with the following GET parameters:
```
```
https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=code&state=YOUR_UNIQUE_STATE_HASH
https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=code&state=YOUR_UNIQUE_STATE_HASH
&scope=REQUESTED_SCOPES
```
```
This will ask the user to approve the applications access to their account and
This will ask the user to approve the applications access to their account
then redirect back to the
`REDIRECT_URI`
you provided. The redirect will
based on the scopes specified in
`REQUESTED_SCOPES`
and then redirect back to
the
`REDIRECT_URI`
you provided. The
[
scope parameter
](
https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Scopes#requesting-particular-scopes
)
is a space separated list of scopes you want to have access to (e.g.
`scope=read_user+profile`
would request
`read_user`
and
`profile`
scopes). The redirect will
include the GET
`code`
parameter, for example:
include the GET
`code`
parameter, for example:
```
```
...
@@ -110,11 +113,14 @@ To request the access token, you should redirect the user to the
...
@@ -110,11 +113,14 @@ To request the access token, you should redirect the user to the
`/oauth/authorize`
endpoint using
`token`
response type:
`/oauth/authorize`
endpoint using
`token`
response type:
```
```
https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=token&state=YOUR_UNIQUE_STATE_HASH
https://gitlab.example.com/oauth/authorize?client_id=APP_ID&redirect_uri=REDIRECT_URI&response_type=token&state=YOUR_UNIQUE_STATE_HASH
&scope=REQUESTED_SCOPES
```
```
This will ask the user to approve the application's access to their account and
This will ask the user to approve the applications access to their account
then redirect them back to the
`REDIRECT_URI`
you provided. The redirect
based on the scopes specified in
`REQUESTED_SCOPES`
and then redirect back to
the
`REDIRECT_URI`
you provided. The
[
scope parameter
](
https://github.com/doorkeeper-gem/doorkeeper/wiki/Using-Scopes#requesting-particular-scopes
)
is a space separated list of scopes you want to have access to (e.g.
`scope=read_user+profile`
would request
`read_user`
and
`profile`
scopes). The redirect
will include a fragment with
`access_token`
as well as token details in GET
will include a fragment with
`access_token`
as well as token details in GET
parameters, for example:
parameters, for example:
...
...
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