mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-09 02:54:09 +00:00
added roles to token model and POST /users/{name}/tokens request body
This commit is contained in:
@@ -451,6 +451,9 @@ paths:
|
|||||||
note:
|
note:
|
||||||
type: string
|
type: string
|
||||||
description: A note attached to the token for future bookkeeping
|
description: A note attached to the token for future bookkeeping
|
||||||
|
roles:
|
||||||
|
type: list
|
||||||
|
description: A list of role names that the token should have
|
||||||
responses:
|
responses:
|
||||||
'201':
|
'201':
|
||||||
description: The newly created token
|
description: The newly created token
|
||||||
@@ -458,6 +461,8 @@ paths:
|
|||||||
$ref: '#/definitions/Token'
|
$ref: '#/definitions/Token'
|
||||||
'400':
|
'400':
|
||||||
description: Body must be a JSON dict or empty
|
description: Body must be a JSON dict or empty
|
||||||
|
'403':
|
||||||
|
description: Requested role does not exist
|
||||||
/users/{name}/tokens/{token_id}:
|
/users/{name}/tokens/{token_id}:
|
||||||
parameters:
|
parameters:
|
||||||
- name: name
|
- name: name
|
||||||
@@ -972,6 +977,11 @@ definitions:
|
|||||||
admin:
|
admin:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Whether the service is an admin
|
description: Whether the service is an admin
|
||||||
|
roles:
|
||||||
|
type: array
|
||||||
|
description: The names of roles this service has
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
description: The internal url where the service is running
|
description: The internal url where the service is running
|
||||||
@@ -1006,6 +1016,11 @@ definitions:
|
|||||||
service:
|
service:
|
||||||
type: string
|
type: string
|
||||||
description: The service that owns the token (undefined of owned by a user)
|
description: The service that owns the token (undefined of owned by a user)
|
||||||
|
roles:
|
||||||
|
type: array
|
||||||
|
description: The names of roles this token has
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
note:
|
note:
|
||||||
type: string
|
type: string
|
||||||
description: A note about the token, typically describing what it was created for.
|
description: A note about the token, typically describing what it was created for.
|
||||||
|
Reference in New Issue
Block a user