Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| #!/usr/bin/env python3 | |
| # FLASK with LDAP3 authentication against active directory and authorization check for group membership | |
| # Written by Maximilian Thoma 2023 | |
| # Visit: https://lanbugs.de for more ... | |
| from functools import wraps | |
| from flask import Flask, request, redirect, url_for, render_template, abort | |
| from flask_login import LoginManager, UserMixin, login_user, login_required, logout_user, current_user | |
| from ldap3 import Server, Connection, SUBTREE, SIMPLE |