mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
finish oauth swagger doc
- clarify that /authorize is not really an API endpoint, but the redirect target - /oauth2/token accepts x-www-form-urlencoded not json
This commit is contained in:
@@ -452,7 +452,9 @@ paths:
|
|||||||
/oauth2/authorize:
|
/oauth2/authorize:
|
||||||
get:
|
get:
|
||||||
summary: 'OAuth 2.0 authorize endpoint'
|
summary: 'OAuth 2.0 authorize endpoint'
|
||||||
description: 'OAuth 2.0 authorize endpoint'
|
description: |
|
||||||
|
Redirect users to this URL to begin the OAuth process.
|
||||||
|
It is not an API endpoint.
|
||||||
parameters:
|
parameters:
|
||||||
- name: client_id
|
- name: client_id
|
||||||
description: The client id
|
description: The client id
|
||||||
@@ -460,7 +462,7 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- name: response_type
|
- name: response_type
|
||||||
description: The response type (token | code)
|
description: The response type (always 'code')
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
@@ -474,40 +476,52 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
|
||||||
/oauth2/token:
|
/oauth2/token:
|
||||||
post:
|
post:
|
||||||
summary: Request an OAuth2 token
|
summary: Request an OAuth2 token
|
||||||
description: Request an OAuth2 token
|
description: |
|
||||||
|
Request an OAuth2 token from an authorization code.
|
||||||
|
This request completes the OAuth process.
|
||||||
|
consumes:
|
||||||
|
- application/x-www-form-urlencoded
|
||||||
parameters:
|
parameters:
|
||||||
- name: client_id
|
- name: client_id
|
||||||
description: The client id
|
description: The client id
|
||||||
in: body
|
in: form
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- name: client_secret
|
- name: client_secret
|
||||||
description:
|
description: The client secret
|
||||||
in: body
|
in: form
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- name: grant_type
|
- name: grant_type
|
||||||
description: The grant type (authorization_code)
|
description: The grant type (always 'authorization_code')
|
||||||
in: body
|
in: form
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- name: code
|
- name: code
|
||||||
description:
|
description: The code provided by the authorization redirect
|
||||||
in: body
|
in: form
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- name: redirect_url
|
- name: redirect_uri
|
||||||
description: The redirect url
|
description: The redirect url
|
||||||
in: body
|
in: form
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
- {'access_token': token}
|
'200':
|
||||||
description: JSON response including the tokk
|
description: JSON response including the token
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
access_token:
|
||||||
|
type: string
|
||||||
|
description: The new API token for the user
|
||||||
|
token_type:
|
||||||
|
type: string
|
||||||
|
description: Will always be 'Bearer'
|
||||||
/shutdown:
|
/shutdown:
|
||||||
post:
|
post:
|
||||||
summary: Shutdown the Hub
|
summary: Shutdown the Hub
|
||||||
|
Reference in New Issue
Block a user