Skip to content

Commit 6fd193d

Browse files
authored
Merge pull request #67 from dmtzs/development
Update flask_authgen_jwt.py
2 parents 18bc18b + 764cf5e commit 6fd193d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = Flask-authgen-jwt
3-
version = 4.1.1
3+
version = 4.1.2
44
author = Diego Martinez
55
license = MIT
66
author_email = [email protected]

src/flask_authgen_jwt.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ def __create_jwt_payload(self, bauth_credentials: dict[str, str]) -> dict[str, U
121121
else:
122122
bauth_credentials = request.get_json()
123123
if self.personal_credentials is not None:
124-
bauth_credentials[self.personal_credentials[0]] = bauth_credentials["username"]
125-
bauth_credentials[self.personal_credentials[1]] = bauth_credentials["password"]
126-
del bauth_credentials["username"]
127-
del bauth_credentials["password"]
124+
bauth_credentials[self.personal_credentials[0]] = bauth_credentials.pop("username")
125+
bauth_credentials[self.personal_credentials[1]] = bauth_credentials.pop("password")
128126
payload = bauth_credentials
129127
payload.update(self.jwt_fields_attr)
130128

0 commit comments

Comments
 (0)