[Doc] Some more documentation
This commit is contained in:
parent
50b6ac85ce
commit
6dfdffebf9
|
@ -1,8 +1,15 @@
|
|||
#############################################
|
||||
# Plugin: Auth #
|
||||
# Functionality: Allow management of #
|
||||
# authentication, login, logout, etc #
|
||||
#############################################
|
||||
"""Flaschengeist plugin: Auth
|
||||
|
||||
Allow management of authentication, login, logout, etc.
|
||||
|
||||
Routes
|
||||
|
||||
/auth POST: login (new token)
|
||||
GET: get all tokens for user
|
||||
/auth/<token> GET: get lifetime of token
|
||||
PUT: set new lifetime
|
||||
DELETE: logout / delete token
|
||||
"""
|
||||
|
||||
from flask import Blueprint, request, jsonify
|
||||
from werkzeug.exceptions import Forbidden, BadRequest, Unauthorized
|
||||
|
@ -11,7 +18,6 @@ from flaschengeist import logger
|
|||
from flaschengeist.modules import Plugin
|
||||
from flaschengeist.system.decorator import login_required
|
||||
from flaschengeist.system.controller import sessionController, userController, messageController
|
||||
from flaschengeist.system.models.session import Session
|
||||
|
||||
auth_bp = Blueprint("auth", __name__)
|
||||
|
||||
|
@ -21,17 +27,6 @@ class AuthRoutePlugin(Plugin):
|
|||
super().__init__(blueprint=auth_bp)
|
||||
|
||||
|
||||
#################################################
|
||||
# Routes #
|
||||
# #
|
||||
# /auth POST: login (new token) #
|
||||
# GET: get all tokens for user #
|
||||
# /auth/<token> GET: get lifetime of token #
|
||||
# PUT: set new lifetime #
|
||||
# DELETE: logout / delete token #
|
||||
#################################################
|
||||
|
||||
|
||||
@auth_bp.route("/auth", methods=["POST"])
|
||||
def _login():
|
||||
"""Login User
|
||||
|
|
Loading…
Reference in New Issue