implement login + logout routes and templates

+ Added route: GET `/login` via `aurweb.routers.auth.login_get`
+ Added route: POST `/login` via `aurweb.routers.auth.login_post`
+ Added route: GET `/logout` via `aurweb.routers.auth.logout`
+ Added route: POST `/logout` via `aurweb.routers.auth.logout_post`
* Modify archdev-navbar.html template to toggle displays on auth state
+ Added login.html template

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2020-12-31 20:44:59 -08:00
parent 56f2798279
commit 5d4a5deddf
5 changed files with 313 additions and 3 deletions

View file

@ -11,7 +11,7 @@ import aurweb.config
from aurweb.auth import BasicAuthBackend
from aurweb.db import get_engine
from aurweb.routers import html, sso, errors
from aurweb.routers import auth, html, sso, errors
routes = set()
@ -42,6 +42,7 @@ async def app_startup():
# Add application routes.
app.include_router(sso.router)
app.include_router(html.router)
app.include_router(auth.router)
# Initialize the database engine and ORM.
get_engine()