OAuth ¶
oauth¶
POST /api/v1/oauth/token¶
Token Endpoint
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBasic |
header | string | N/A | No | Basic authentication |
Request body
{
"grant_type": "authorization_code",
"client_id": null,
"code": null,
"client_secret": null,
"code_verifier": null,
"refresh_token": null
}
Schema of the request body
{
"properties": {
"grant_type": {
"$ref": "#/components/schemas/GrantType"
},
"client_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Client Id"
},
"code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code"
},
"client_secret": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Client Secret"
},
"code_verifier": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Code Verifier"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Refresh Token"
}
},
"type": "object",
"required": [
"grant_type"
],
"title": "TokenRequest"
}
Responses
{
"access_token": "string",
"token_type": "string",
"expires_in": 0,
"refresh_token": null,
"scope": null,
"id_token": null
}
Schema of the response body
{
"properties": {
"access_token": {
"type": "string",
"title": "Access Token"
},
"token_type": {
"type": "string",
"const": "Bearer",
"title": "Token Type",
"default": "Bearer"
},
"expires_in": {
"type": "integer",
"title": "Expires In"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Refresh Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scope"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id Token"
}
},
"type": "object",
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/oauth/userinfo¶
Userinfo
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
{
"sub": "string",
"given_name": null,
"family_name": null,
"email": null,
"registered_at": "2022-04-13T15:42:05.901Z",
"name": "string"
}
Schema of the response body
{
"properties": {
"sub": {
"type": "string",
"title": "Sub"
},
"given_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Given Name"
},
"family_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Family Name"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Email"
},
"registered_at": {
"type": "string",
"format": "date-time",
"title": "Registered At"
},
"name": {
"type": "string",
"title": "Name",
"readOnly": true
}
},
"type": "object",
"required": [
"sub",
"registered_at",
"name"
],
"title": "UserInfoResponse"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
POST /api/v1/oauth/delegated-token¶
Delegated Token
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Request body
{
"sub": "string",
"scopes": null,
"team_id": null
}
Schema of the request body
{
"properties": {
"sub": {
"type": "string",
"title": "Sub"
},
"scopes": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/Scope"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Scopes"
},
"team_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Team Id"
}
},
"type": "object",
"required": [
"sub"
],
"title": "DelegatedTokenRequest"
}
Responses
{
"access_token": "string",
"token_type": "string",
"expires_in": 0,
"refresh_token": null,
"scope": null,
"id_token": null
}
Schema of the response body
{
"properties": {
"access_token": {
"type": "string",
"title": "Access Token"
},
"token_type": {
"type": "string",
"const": "Bearer",
"title": "Token Type",
"default": "Bearer"
},
"expires_in": {
"type": "integer",
"title": "Expires In"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Refresh Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scope"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id Token"
}
},
"type": "object",
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
GET /api/v1/oauth/principal-token¶
Principal Token
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
HTTPBearer |
header | string | N/A | No | JWT Bearer token |
refreshed-token |
header | No | |||
token |
cookie | string | No |
Responses
{
"access_token": "string",
"token_type": "string",
"expires_in": 0,
"refresh_token": null,
"scope": null,
"id_token": null
}
Schema of the response body
{
"properties": {
"access_token": {
"type": "string",
"title": "Access Token"
},
"token_type": {
"type": "string",
"const": "Bearer",
"title": "Token Type",
"default": "Bearer"
},
"expires_in": {
"type": "integer",
"title": "Expires In"
},
"refresh_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Refresh Token"
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scope"
},
"id_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Id Token"
}
},
"type": "object",
"required": [
"access_token",
"expires_in"
],
"title": "TokenResponse"
}
{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string"
}
]
}
Schema of the response body
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Schemas¶
DelegatedTokenRequest¶
| Name | Type | Description |
|---|---|---|
scopes |
||
sub |
string | |
team_id |
GrantType¶
Type: string
HTTPValidationError¶
| Name | Type | Description |
|---|---|---|
detail |
Array<ValidationError> |
Scope¶
Type: string
TokenRequest¶
| Name | Type | Description |
|---|---|---|
client_id |
||
client_secret |
||
code |
||
code_verifier |
||
grant_type |
GrantType | |
refresh_token |
TokenResponse¶
| Name | Type | Description |
|---|---|---|
access_token |
string | |
expires_in |
integer | |
id_token |
||
refresh_token |
||
scope |
||
token_type |
string |
UserInfoResponse¶
| Name | Type | Description |
|---|---|---|
email |
||
family_name |
||
given_name |
||
name |
string | |
registered_at |
string(date-time) | |
sub |
string |
ValidationError¶
| Name | Type | Description |
|---|---|---|
loc |
Array<> | |
msg |
string | |
type |
string |
Security schemes¶
| Name | Type | Scheme | Description |
|---|---|---|---|
| HTTPBearer | http | bearer | |
| HTTPBasic | http | basic |