diff options
author | Frederick Muriuki Muriithi | 2024-04-23 17:08:18 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-04-23 17:08:18 +0300 |
commit | b4278a0dfd1aaa1c95cc811aa15f3cf9ea4a54bc (patch) | |
tree | e6495dbd699515258aa841c6722cc085c626be1c /gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py | |
parent | d4b8d19a74607468c21a247f07f39c8a18e59993 (diff) | |
download | gn-auth-b4278a0dfd1aaa1c95cc811aa15f3cf9ea4a54bc.tar.gz |
pylint: Fix linting errors.
Diffstat (limited to 'gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py')
-rw-r--r-- | gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py b/gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py index 85c8d2e..895acb7 100644 --- a/gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py +++ b/gn_auth/auth/authentication/oauth2/grants/jwt_bearer_grant.py @@ -1,19 +1,12 @@ """JWT as Authorisation Grant""" -import uuid -from urllib.parse import urlparse -from datetime import datetime, timedelta - -from flask import request, current_app as app - -from authlib.jose import jwt +from flask import current_app as app from authlib.oauth2.rfc7523.jwt_bearer import JWTBearerGrant as _JWTBearerGrant from authlib.oauth2.rfc7523.token import ( JWTBearerTokenGenerator as _JWTBearerTokenGenerator) +from gn_auth.auth.db.sqlite3 import with_db_connection from gn_auth.auth.authentication.users import user_by_id -from gn_auth.auth.db.sqlite3 import connection, with_db_connection -from gn_auth.auth.authentication.oauth2.models.oauth2client import client class JWTBearerTokenGenerator(_JWTBearerTokenGenerator): @@ -23,7 +16,9 @@ class JWTBearerTokenGenerator(_JWTBearerTokenGenerator): DEFAULT_EXPIRES_IN = 300 - def get_token_data(self, grant_type, client, expires_in=300, user=None, scope=None): + def get_token_data(#pylint: disable=[too-many-arguments] + self, grant_type, client, expires_in=300, user=None, scope=None + ): """Post process data to prevent JSON serialization problems.""" tokendata = super().get_token_data( grant_type, client, expires_in, user, scope) |