mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-14 05:23:01 +00:00
Flesh out auth in swagger spec
This commit is contained in:
@@ -411,9 +411,11 @@ paths:
|
|||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
description: The new API token.
|
description: The new API token.
|
||||||
|
'403':
|
||||||
|
description: The user can not be authenticated.
|
||||||
/authorizations/token/{token}:
|
/authorizations/token/{token}:
|
||||||
get:
|
get:
|
||||||
summary: Identify a user from an API token
|
summary: Identify a user or service from an API token
|
||||||
parameters:
|
parameters:
|
||||||
- name: token
|
- name: token
|
||||||
in: path
|
in: path
|
||||||
@@ -421,9 +423,12 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: The user identified by the API token
|
description: The user or service identified by the API token
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
|
$ref: '#/definitions/Service'
|
||||||
|
'404':
|
||||||
|
description: A user or service is not found.
|
||||||
/authorizations/cookie/{cookie_name}/{cookie_value}:
|
/authorizations/cookie/{cookie_name}/{cookie_value}:
|
||||||
get:
|
get:
|
||||||
summary: Identify a user from a cookie
|
summary: Identify a user from a cookie
|
||||||
@@ -442,45 +447,70 @@ paths:
|
|||||||
description: The user identified by the cookie
|
description: The user identified by the cookie
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
|
'404':
|
||||||
|
description: A user is not found.
|
||||||
/oath2/authorize:
|
/oath2/authorize:
|
||||||
get:
|
get:
|
||||||
summary:
|
summary: 'OAuth 2.0 authorize endpoint'
|
||||||
description:
|
description: 'OAuth 2.0 authorize endpoint'
|
||||||
parameters:
|
parameters:
|
||||||
|
- name: client_id
|
||||||
|
description: The client id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- name: response_type
|
||||||
|
description: The response type (token | code)
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- name: state
|
||||||
|
description: A state string
|
||||||
|
in: path
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: redirect_uri
|
||||||
|
description: The redirect url
|
||||||
|
in: path
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: scope
|
||||||
|
description: The requested scopes
|
||||||
|
in: path
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
|
||||||
description:
|
|
||||||
/oath2/token:
|
/oath2/token:
|
||||||
post:
|
|
||||||
summary: Request an OAuth2 token
|
|
||||||
description: |
|
|
||||||
Request an OAuth2 token.
|
|
||||||
parameters: ????
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: The new OAuth2 token
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
token:
|
|
||||||
type: string
|
|
||||||
description: The new OAuth2 token.
|
|
||||||
'400': ??
|
|
||||||
/shutdown:
|
|
||||||
post:
|
post:
|
||||||
summary: Shutdown the Hub
|
summary: Request an OAuth2 token
|
||||||
|
description: Request an OAuth2 token
|
||||||
parameters:
|
parameters:
|
||||||
- name: proxy
|
- name: client_id
|
||||||
in: body
|
description: The client id
|
||||||
type: boolean
|
in: path
|
||||||
description: Whether the proxy should be shutdown as well (default from Hub config)
|
required: true
|
||||||
- name: servers
|
type: string
|
||||||
in: body
|
- name: response_type
|
||||||
type: boolean
|
description: The response type (token | code)
|
||||||
description: Whether users's notebook servers should be shutdown as well (default from Hub config)
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- name: state
|
||||||
|
description: A state string
|
||||||
|
in: path
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: redirect_uri
|
||||||
|
description: The redirect url
|
||||||
|
in: path
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
- name: scope
|
||||||
|
description: The requested scopes
|
||||||
|
in: path
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
|
||||||
description: Hub has shutdown
|
|
||||||
definitions:
|
definitions:
|
||||||
User:
|
User:
|
||||||
type: object
|
type: object
|
||||||
|
Reference in New Issue
Block a user