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
8a695679
Commit
8a695679
authored
Aug 21, 2020
by
Jeff Crow
Committed by
Mike Jang
Aug 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Change /token request to use HTTPS
parent
d833191d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
doc/api/oauth2.md
doc/api/oauth2.md
+4
-4
No files found.
doc/api/oauth2.md
View file @
8a695679
...
...
@@ -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
http
s://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
'http
s
://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
http
s://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
=>
"http
s
://example.com"
)
access_token
=
client
.
password
.
get_token
(
'user@example.com'
,
'secret'
)
puts
access_token
.
token
```
...
...
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