Switch to OIDC authentication

This commit is contained in:
Timotej Lazar 2023-09-06 14:28:06 +02:00
parent 5add39a8a7
commit 9dc0fbb4fe
5 changed files with 88 additions and 81 deletions

17
web/errors.py Normal file
View file

@ -0,0 +1,17 @@
import flask
import werkzeug.exceptions
def init_app(app):
@app.errorhandler(werkzeug.exceptions.HTTPException)
def http_error(e):
return e
@app.errorhandler(TimeoutError)
def timeout_error(e):
return flask.render_template('busy.html')
@app.errorhandler(Exception)
def internal_server_error(e):
return flask.Response(f'something went catastrophically wrong: {e}',
status=500, mimetype='text/plain')