|
8e69733cf6
|
Updated the login_required view decorator of the DigestAuth class, replaced writing to STDERR directly with warning through the Flask logger.
|
2023-05-03 08:05:28 +08:00 |
|
|
5b255b6504
|
Split the Flask-Login login manager initialization from the init_app method to the __init_login_manager method in the DigestAuth class, to simplify the code.
|
2023-04-29 11:17:11 +08:00 |
|
|
919b8d0dc3
|
Removed the unnecessary f-string in the __make_response_header method of the DigestAuth class.
|
2023-04-29 10:44:15 +08:00 |
|
|
e861cae2e0
|
Replaced importing the "typing" module as "t" with importing the individual names in the "typing" module. We do not have as many names to import. This is also to be consistent with the practices of most major and standard packages and examples.
|
2023-04-27 09:08:10 +08:00 |
|
|
5faf51c49b
|
Removed the realm from the example in the documentation of the init_app method of the DigestAuth class.
|
2023-01-07 15:03:37 +08:00 |
|
|
27d27127f6
|
Added the DIGEST_AUTH_REALM configuration variable as the recommended way to set the authentication realm. Changed the default realm from an empty string to "Login Required".
|
2023-01-06 00:20:40 +08:00 |
|
|
ea31bb9579
|
Revised the coding style in the init_app method of the DigestAuth class.
|
2023-01-05 22:42:59 +08:00 |
|
|
574ecade05
|
Revised the copyright year in auth.py.
|
2023-01-04 21:29:04 +08:00 |
|
|
84b9c5f62e
|
Renamed digest_auth_state to _digest_auth_state as the state stored in the request instance.
|
2023-01-04 20:48:45 +08:00 |
|
|
4990de085c
|
Changed to store the DigestAuth instance from app.digest_auth to app.extensions["digest_auth"].
|
2023-01-04 20:42:51 +08:00 |
|
|
51e51ae4e2
|
Replaced auth.app with current_app.
|
2023-01-04 20:37:57 +08:00 |
|
|
aeb93a60e5
|
Fixed to store the auth state in request instead of the g global object in the flask_login load_user_from_request and unauthorized handlers in the init_app method of the DigestAuth class. This is so that the auth state is always reset in the lifecycle of request even if g stays. Revised the unauthorized to create a new auth state if it is not available in the current request, in the case that the load_user_from_request handler was not run previously.
|
2022-12-29 23:43:35 +08:00 |
|
|
79abdc9cde
|
Fixed the documentation of the login_required decorator in the DigestAuth class.
|
2022-12-07 18:48:39 +08:00 |
|
|
0387abb4f6
|
Revised the documentation in the "flask_digest_auth.auth" module.
|
2022-12-07 18:39:20 +08:00 |
|
|
c004e28c37
|
Fixed the documentation of the AuthState class and the UnauthorizedException exception.
|
2022-12-07 16:08:07 +08:00 |
|
|
b9384150b7
|
Added documentation to the private properties of DigestAuth.
|
2022-12-07 06:55:34 +08:00 |
|
|
83cf83a67c
|
Revised the type hint of the "algorithm" and "__qop" properties of the DigestAuth class.
|
2022-12-06 23:55:20 +08:00 |
|
|
7aaa7b9abe
|
Revised the documentations.
|
2022-12-06 23:52:42 +08:00 |
|
|
14b90de059
|
Revised the documentation of the "use_opaque" and "__domain" properties in the DigestAuth class.
|
2022-12-06 23:27:28 +08:00 |
|
|
e9013017fb
|
Changed the "domain" and "qop" property to private in the DigestAuth class.
|
2022-12-06 23:26:42 +08:00 |
|
|
6e6ac8bbe7
|
Changed the "serializer" property to private in the DigestAuth class.
|
2022-12-06 23:14:32 +08:00 |
|
|
7ec56ee52d
|
Removed the secret_key attribute from the DigestAuth class. It is actually not used.
|
2022-12-06 23:13:45 +08:00 |
|
|
b348c872dc
|
Fixed the example in the documentation of the login_required decorator.
|
2022-12-06 22:59:13 +08:00 |
|
|
765822a300
|
Revised the documentation.
|
2022-12-06 21:54:10 +08:00 |
|
|
e9a6449505
|
Changed the "authenticate" and "make_response_header" methods to private in the DigestAuth class.
|
2022-12-06 21:22:16 +08:00 |
|
|
a6dc530ac7
|
Moved the BasePasswordHashGetter, BaseUserGetter, and BaseUserGetter classes to the end of flask_digest_auth.auth, for readability.
|
2022-12-06 17:47:21 +08:00 |
|
|
6a14c04aaa
|
Moved UnauthorizedException from flask_digest_auth.exception to flask_digest_auth.auth, because it is only used there.
|
2022-12-06 17:46:17 +08:00 |
|
|
b6bfb2eae9
|
Revised the documentation of the DigestAuth class and the calc_response function.
|
2022-12-06 17:38:58 +08:00 |
|
|
0dfdf70c45
|
Fixed a minor problem in the get_logged_in_user function.
|
2022-11-30 08:31:58 +08:00 |
|
|
3709cb4d66
|
Fixed the return type hint of the get_logged_in_user function.
|
2022-11-30 08:30:42 +08:00 |
|
|
9d0d0b2686
|
Revised the login_required method of the DigestAuth class for readability.
|
2022-11-29 22:24:25 +08:00 |
|
|
9616fb3ddc
|
Added the get_opaque inline function in the make_response_header method of the DigestAuth class for readability.
|
2022-11-29 21:52:19 +08:00 |
|
|
f3b525d715
|
Replaced random.random() with secrets.randbits() in the make_response_header method of the DigestAuth class.
|
2022-11-29 19:13:50 +08:00 |
|
|
be163d35fb
|
Added the on-login callback for the log in bookkeeping.
|
2022-11-27 06:58:29 +11:00 |
|
|
2aaaa9f47f
|
Changed the BasePasswordGetter and BaseUserGetter from abstract to non-abstract, to simplify the code.
|
2022-11-27 06:32:02 +11:00 |
|
|
6f49a180e3
|
Revised the DigestAuth class to deal with the dummy get_password_hash and get_user functions when they are not registered yet.
|
2022-11-26 09:37:13 +11:00 |
|
|
af8c3a484c
|
Revised so that you always call digest_auth.init_app(), to avoid confusion. It remembers the current application. The logout() method no longer need current_app for the current application.
|
2022-11-25 09:14:57 +11:00 |
|
|
cb5cfaf7d4
|
Added logging out.
|
2022-11-25 08:40:27 +11:00 |
|
|
2770e1cc12
|
Revised so that Flask-Login become an optional dependency.
|
2022-11-24 01:02:51 +11:00 |
|
|
0a69f5d3c1
|
Added the initial version that works.
|
2022-11-23 18:12:04 +11:00 |
|