Skip to content

Commit b2dad27

Browse files
committed
Cleanup
1 parent 0b1c42f commit b2dad27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/dot_ext/views/authorization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
IntrospectTokenView as DotIntrospectTokenView,
2121
)
2222
from oauth2_provider.models import get_application_model
23-
from oauthlib import oauth2
23+
from oauthlib.oauth2 import AccessDeniedError
2424
from oauthlib.oauth2.rfc6749.errors import InvalidClientError, InvalidGrantError
2525
from urllib.parse import urlparse, parse_qs
2626
import html
@@ -184,7 +184,7 @@ def form_valid(self, form):
184184
# Since the create_authorization_response will re-inject scopes even when none are
185185
# valid, we want to pre-emptively treat this as an error case
186186
raise OAuthToolkitError(
187-
error=oauth2.AccessDeniedError(state=credentials.get("state", None)), redirect_uri=credentials["redirect_uri"]
187+
error=AccessDeniedError(state=credentials.get("state", None)), redirect_uri=credentials["redirect_uri"]
188188
)
189189
uri, headers, body, status = self.create_authorization_response(
190190
request=self.request, scopes=scopes, credentials=credentials, allow=allow

0 commit comments

Comments
 (0)