Moved UnauthorizedException from flask_digest_auth.exception to flask_digest_auth.auth, because it is only used there.
This commit is contained in:
parent
f9e10ecb2f
commit
6a14c04aaa
@ -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
|
||||
|
@ -1,25 +0,0 @@
|
||||
# The Flask HTTP Digest Authentication Project.
|
||||
# Author: imacat@mail.imacat.idv.tw (imacat), 2022/11/3
|
||||
|
||||
# Copyright (c) 2022 imacat.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
"""The exception.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class UnauthorizedException(Exception):
|
||||
"""The exception thrown when the authentication is failed."""
|
||||
pass
|
Loading…
Reference in New Issue
Block a user