aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authentication/oauth2
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authentication/oauth2')
-rw-r--r--gn_auth/auth/authentication/oauth2/grants/password_grant.py3
-rw-r--r--gn_auth/auth/authentication/oauth2/models/oauth2client.py3
-rw-r--r--gn_auth/auth/authentication/oauth2/models/oauth2token.py2
-rw-r--r--gn_auth/auth/authentication/oauth2/views.py4
4 files changed, 5 insertions, 7 deletions
diff --git a/gn_auth/auth/authentication/oauth2/grants/password_grant.py b/gn_auth/auth/authentication/oauth2/grants/password_grant.py
index 79382fd..acd0958 100644
--- a/gn_auth/auth/authentication/oauth2/grants/password_grant.py
+++ b/gn_auth/auth/authentication/oauth2/grants/password_grant.py
@@ -4,10 +4,9 @@ from flask import current_app as app
from authlib.oauth2.rfc6749 import grants
from gn_auth.auth.db import sqlite3 as db
+from gn_auth.auth.errors import NotFoundError
from gn_auth.auth.authentication.users import valid_login, user_by_email
-from gn_auth.auth.authorisation.errors import NotFoundError
-
class PasswordGrant(grants.ResourceOwnerPasswordCredentialsGrant):
"""Implement the 'Password' grant."""
TOKEN_ENDPOINT_AUTH_METHODS = ["client_secret_basic", "client_secret_post"]
diff --git a/gn_auth/auth/authentication/oauth2/models/oauth2client.py b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
index 98c3001..0f40688 100644
--- a/gn_auth/auth/authentication/oauth2/models/oauth2client.py
+++ b/gn_auth/auth/authentication/oauth2/models/oauth2client.py
@@ -11,13 +11,12 @@ from authlib.oauth2.rfc6749 import ClientMixin
from pymonad.maybe import Just, Maybe, Nothing
from gn_auth.auth.db import sqlite3 as db
+from gn_auth.auth.errors import NotFoundError
from gn_auth.auth.authentication.users import (User,
fetch_users,
user_by_id,
same_password)
-from gn_auth.auth.authorisation.errors import NotFoundError
-
@dataclass(frozen=True)
class OAuth2Client(ClientMixin):
diff --git a/gn_auth/auth/authentication/oauth2/models/oauth2token.py b/gn_auth/auth/authentication/oauth2/models/oauth2token.py
index 45962cd..6ec5c3d 100644
--- a/gn_auth/auth/authentication/oauth2/models/oauth2token.py
+++ b/gn_auth/auth/authentication/oauth2/models/oauth2token.py
@@ -10,8 +10,8 @@ from pymonad.tools import monad_from_none_or_value
from pymonad.maybe import Just, Maybe, Nothing
from gn_auth.auth.db import sqlite3 as db
+from gn_auth.auth.errors import NotFoundError
from gn_auth.auth.authentication.users import User, user_by_id
-from gn_auth.auth.authorisation.errors import NotFoundError
from .oauth2client import client, OAuth2Client
diff --git a/gn_auth/auth/authentication/oauth2/views.py b/gn_auth/auth/authentication/oauth2/views.py
index add2cba..8e2ceef 100644
--- a/gn_auth/auth/authentication/oauth2/views.py
+++ b/gn_auth/auth/authentication/oauth2/views.py
@@ -16,13 +16,13 @@ from flask import (
from gn_auth.auth.db import sqlite3 as db
from gn_auth.auth.db.sqlite3 import with_db_connection
-from gn_auth.auth.authorisation.errors import ForbiddenAccess
+from gn_auth.auth.errors import NotFoundError, ForbiddenAccess
+from gn_auth.auth.authentication.users import valid_login, user_by_email
from .resource_server import require_oauth
from .endpoints.revocation import RevocationEndpoint
from .endpoints.introspection import IntrospectionEndpoint
-from ..users import valid_login, NotFoundError, user_by_email
auth = Blueprint("auth", __name__)