Compare commits
3 Commits
v0.6.0
...
5b255b6504
Author | SHA1 | Date | |
---|---|---|---|
5b255b6504 | |||
919b8d0dc3 | |||
604ed0be27 |
@ -26,7 +26,7 @@ version: 2
|
|||||||
build:
|
build:
|
||||||
os: ubuntu-22.04
|
os: ubuntu-22.04
|
||||||
tools:
|
tools:
|
||||||
python: "3.7"
|
python: "3.8"
|
||||||
|
|
||||||
# Build documentation in the docs/ directory with Sphinx
|
# Build documentation in the docs/ directory with Sphinx
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ class DigestAuth:
|
|||||||
if opaque is not None:
|
if opaque is not None:
|
||||||
header += f", opaque=\"{opaque}\""
|
header += f", opaque=\"{opaque}\""
|
||||||
if state.stale is not None:
|
if state.stale is not None:
|
||||||
header += f", stale=TRUE" if state.stale else f", stale=FALSE"
|
header += ", stale=TRUE" if state.stale else ", stale=FALSE"
|
||||||
if self.algorithm is not None:
|
if self.algorithm is not None:
|
||||||
header += f", algorithm=\"{self.algorithm}\""
|
header += f", algorithm=\"{self.algorithm}\""
|
||||||
if len(self.__qop) > 0:
|
if len(self.__qop) > 0:
|
||||||
@ -344,8 +344,15 @@ class DigestAuth:
|
|||||||
self.realm = app.config["DIGEST_AUTH_REALM"]
|
self.realm = app.config["DIGEST_AUTH_REALM"]
|
||||||
|
|
||||||
if hasattr(app, "login_manager"):
|
if hasattr(app, "login_manager"):
|
||||||
from flask_login import LoginManager, login_user
|
self.__init_login_manager(app)
|
||||||
|
|
||||||
|
def __init_login_manager(self, app: Flask) -> None:
|
||||||
|
"""Initializes the Flask-Login login manager.
|
||||||
|
|
||||||
|
:param app: The Flask application.
|
||||||
|
:return: None.
|
||||||
|
"""
|
||||||
|
from flask_login import LoginManager, login_user
|
||||||
login_manager: LoginManager = getattr(app, "login_manager")
|
login_manager: LoginManager = getattr(app, "login_manager")
|
||||||
|
|
||||||
@login_manager.unauthorized_handler
|
@login_manager.unauthorized_handler
|
||||||
|
Reference in New Issue
Block a user