diff --git a/schilder2000/__init__.py b/schilder2000/__init__.py index 9460218b6c3ee9702184024492f41bb8426118ae..159073c92fbfb8708dfbf40d52366cd71f8bec99 100644 --- a/schilder2000/__init__.py +++ b/schilder2000/__init__.py @@ -33,6 +33,10 @@ def create_app(): multipass.identity_handler(identity_handler) multipass.init_app(app) + for k, v in app.view_functions.items(): + if k.startswith("_flaskmultipass_saml_acs_"): + csrf.exempt(v) + app.config.update( { "WEBPACK_LOADER": { diff --git a/schilder2000/helpers.py b/schilder2000/helpers.py index 653df7f850d739f2a537a72a95b3607794393b07..f4aaf9e6e787614a2e295aac74801332c23f8bb8 100644 --- a/schilder2000/helpers.py +++ b/schilder2000/helpers.py @@ -101,6 +101,7 @@ def identity_handler(identity_info: IdentityInfo): data=identity_info.data, ) + def require_login(): if "identity" not in session: return redirect(url_for("login"))