Changed to store the DigestAuth instance from app.digest_auth to app.extensions["digest_auth"].
This commit is contained in:
parent
51e51ae4e2
commit
4990de085c
@ -327,7 +327,8 @@ class DigestAuth:
|
|||||||
self.__on_login = OnLogInCallback()
|
self.__on_login = OnLogInCallback()
|
||||||
|
|
||||||
def init_app(self, app: Flask) -> None:
|
def init_app(self, app: Flask) -> None:
|
||||||
"""Initializes the Flask application.
|
"""Initializes the Flask application. The DigestAuth instance will
|
||||||
|
be stored in ``app.extensions["digest_auth"]``.
|
||||||
|
|
||||||
:Example:
|
:Example:
|
||||||
|
|
||||||
@ -341,7 +342,7 @@ class DigestAuth:
|
|||||||
:param app: The Flask application.
|
:param app: The Flask application.
|
||||||
:return: None.
|
:return: None.
|
||||||
"""
|
"""
|
||||||
app.digest_auth = self
|
app.extensions["digest_auth"] = self
|
||||||
|
|
||||||
if hasattr(app, "login_manager"):
|
if hasattr(app, "login_manager"):
|
||||||
from flask_login import LoginManager, login_user
|
from flask_login import LoginManager, login_user
|
||||||
|
Loading…
Reference in New Issue
Block a user