Moved UnauthorizedException from flask_digest_auth.exception to flask_digest_auth.auth, because it is only used there.

This commit is contained in:
2022-12-06 17:46:17 +08:00
parent f9e10ecb2f
commit 6a14c04aaa
2 changed files with 5 additions and 26 deletions

View File

@ -31,7 +31,6 @@ from itsdangerous import URLSafeTimedSerializer, BadData
from werkzeug.datastructures import Authorization
from flask_digest_auth.algo import calc_response
from flask_digest_auth.exception import UnauthorizedException
class BasePasswordHashGetter:
@ -400,3 +399,8 @@ class AuthState:
"""Constructs the authorization state."""
self.opaque: t.Optional[str] = None
self.stale: t.Optional[bool] = None
class UnauthorizedException(Exception):
"""The exception thrown when the authentication is failed."""
pass