Add auth foundation and app DB management
This commit is contained in:
@@ -27,6 +27,105 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/login": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Login Page",
|
||||
"operationId": "login_page_login_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"text/html": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Login Submit",
|
||||
"operationId": "login_submit_login_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/x-www-form-urlencoded": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Body_login_submit_login_post"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"text/html": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logout": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Logout",
|
||||
"operationId": "logout_logout_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/x-www-form-urlencoded": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Body_logout_logout_post"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -48,6 +147,27 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"pages"
|
||||
],
|
||||
"summary": "Admin Page",
|
||||
"operationId": "admin_page_admin_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"text/html": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/homeassistant/publish": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -127,6 +247,55 @@
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Body_login_submit_login_post": {
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"title": "Username"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"title": "Password"
|
||||
},
|
||||
"csrf_token": {
|
||||
"type": "string",
|
||||
"title": "Csrf Token"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"username",
|
||||
"password",
|
||||
"csrf_token"
|
||||
],
|
||||
"title": "Body_login_submit_login_post"
|
||||
},
|
||||
"Body_logout_logout_post": {
|
||||
"properties": {
|
||||
"csrf_token": {
|
||||
"type": "string",
|
||||
"title": "Csrf Token"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"csrf_token"
|
||||
],
|
||||
"title": "Body_logout_logout_post"
|
||||
},
|
||||
"HTTPValidationError": {
|
||||
"properties": {
|
||||
"detail": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ValidationError"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Detail"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"title": "HTTPValidationError"
|
||||
},
|
||||
"StatusResponse": {
|
||||
"properties": {
|
||||
"status": {
|
||||
@@ -139,6 +308,39 @@
|
||||
"status"
|
||||
],
|
||||
"title": "StatusResponse"
|
||||
},
|
||||
"ValidationError": {
|
||||
"properties": {
|
||||
"loc": {
|
||||
"items": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "integer"
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Location"
|
||||
},
|
||||
"msg": {
|
||||
"type": "string",
|
||||
"title": "Message"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "Error Type"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"loc",
|
||||
"msg",
|
||||
"type"
|
||||
],
|
||||
"title": "ValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,67 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/StatusResponse'
|
||||
/login:
|
||||
get:
|
||||
tags:
|
||||
- auth
|
||||
summary: Login Page
|
||||
operationId: login_page_login_get
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
post:
|
||||
tags:
|
||||
- auth
|
||||
summary: Login Submit
|
||||
operationId: login_submit_login_post
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Body_login_submit_login_post'
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
'422':
|
||||
description: Validation Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPValidationError'
|
||||
/logout:
|
||||
post:
|
||||
tags:
|
||||
- auth
|
||||
summary: Logout
|
||||
operationId: logout_logout_post
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Body_logout_logout_post'
|
||||
required: true
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
'422':
|
||||
description: Validation Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPValidationError'
|
||||
/:
|
||||
get:
|
||||
tags:
|
||||
@@ -31,6 +92,19 @@ paths:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
/admin:
|
||||
get:
|
||||
tags:
|
||||
- pages
|
||||
summary: Admin Page
|
||||
operationId: admin_page_admin_get
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
/homeassistant/publish:
|
||||
post:
|
||||
tags:
|
||||
@@ -81,6 +155,41 @@ paths:
|
||||
schema: {}
|
||||
components:
|
||||
schemas:
|
||||
Body_login_submit_login_post:
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
title: Username
|
||||
password:
|
||||
type: string
|
||||
title: Password
|
||||
csrf_token:
|
||||
type: string
|
||||
title: Csrf Token
|
||||
type: object
|
||||
required:
|
||||
- username
|
||||
- password
|
||||
- csrf_token
|
||||
title: Body_login_submit_login_post
|
||||
Body_logout_logout_post:
|
||||
properties:
|
||||
csrf_token:
|
||||
type: string
|
||||
title: Csrf Token
|
||||
type: object
|
||||
required:
|
||||
- csrf_token
|
||||
title: Body_logout_logout_post
|
||||
HTTPValidationError:
|
||||
properties:
|
||||
detail:
|
||||
items:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
type: array
|
||||
title: Detail
|
||||
type: object
|
||||
title: HTTPValidationError
|
||||
StatusResponse:
|
||||
properties:
|
||||
status:
|
||||
@@ -90,3 +199,24 @@ components:
|
||||
required:
|
||||
- status
|
||||
title: StatusResponse
|
||||
ValidationError:
|
||||
properties:
|
||||
loc:
|
||||
items:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: integer
|
||||
type: array
|
||||
title: Location
|
||||
msg:
|
||||
type: string
|
||||
title: Message
|
||||
type:
|
||||
type: string
|
||||
title: Error Type
|
||||
type: object
|
||||
required:
|
||||
- loc
|
||||
- msg
|
||||
- type
|
||||
title: ValidationError
|
||||
|
||||
Reference in New Issue
Block a user