parent
112eaea544
commit
1d7ebd0ee6
1 changed files with 3 additions and 3 deletions
|
|
@ -651,9 +651,9 @@ def refresh_auth_exists(user_id, tenant_id, jwt_jti=None):
|
|||
def change_jwt_iat_jti(user_id):
|
||||
with pg_client.PostgresClient() as cur:
|
||||
query = cur.mogrify(f"""UPDATE public.users
|
||||
SET jwt_iat = timezone('utc'::text, now()),
|
||||
SET jwt_iat = timezone('utc'::text, now()-INTERVAL '2s'),
|
||||
jwt_refresh_jti = 0,
|
||||
jwt_refresh_iat = timezone('utc'::text, now())
|
||||
jwt_refresh_iat = timezone('utc'::text, now()-INTERVAL '2s')
|
||||
WHERE user_id = %(user_id)s
|
||||
RETURNING EXTRACT (epoch FROM jwt_iat)::BIGINT AS jwt_iat,
|
||||
jwt_refresh_jti,
|
||||
|
|
@ -667,7 +667,7 @@ def change_jwt_iat_jti(user_id):
|
|||
def refresh_jwt_iat_jti(user_id):
|
||||
with pg_client.PostgresClient() as cur:
|
||||
query = cur.mogrify(f"""UPDATE public.users
|
||||
SET jwt_iat = timezone('utc'::text, now()),
|
||||
SET jwt_iat = timezone('utc'::text, now()-INTERVAL '2s'),
|
||||
jwt_refresh_jti = jwt_refresh_jti + 1
|
||||
WHERE user_id = %(user_id)s
|
||||
RETURNING EXTRACT (epoch FROM jwt_iat)::BIGINT AS jwt_iat,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue