diff options
author | Frederick Muriuki Muriithi | 2024-07-18 16:57:43 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-07-31 09:30:20 -0500 |
commit | ddb2b6804672c982568be891b35a5352cc6263b0 (patch) | |
tree | c154d188392f7901616144379e107d83802775bf /gn_auth/auth/authentication/oauth2 | |
parent | 945c70b238ec3cc31613b3c17d5ad57c5a2eedee (diff) | |
download | gn-auth-ddb2b6804672c982568be891b35a5352cc6263b0.tar.gz |
Update datetime references on changed import.
Diffstat (limited to 'gn_auth/auth/authentication/oauth2')
-rw-r--r-- | gn_auth/auth/authentication/oauth2/server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gn_auth/auth/authentication/oauth2/server.py b/gn_auth/auth/authentication/oauth2/server.py index d1aa69e..6ed3c86 100644 --- a/gn_auth/auth/authentication/oauth2/server.py +++ b/gn_auth/auth/authentication/oauth2/server.py @@ -61,7 +61,7 @@ def create_save_token_func(token_model: type, jwtkey: jwk) -> Callable: **{ "refresh_token": None, "revoked": False, - "issued_at": datetime.datetime.now(), + "issued_at": datetime.now(), **token }) with db.connection(current_app.config["AUTH_DB"]) as conn: @@ -75,8 +75,8 @@ def create_save_token_func(token_model: type, jwtkey: jwk) -> Callable: client=request.client, user=request.user, issued_with=uuid.UUID(_jwt["jti"]), - issued_at=datetime.datetime.fromtimestamp(_jwt["iat"]), - expires=datetime.datetime.fromtimestamp( + issued_at=datetime.fromtimestamp(_jwt["iat"]), + expires=datetime.fromtimestamp( old_refresh_token.then( lambda _tok: _tok.expires.timestamp() ).maybe((int(_jwt["iat"]) + |