mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-14 12:14:46 +00:00
update token expiry for test openid server
This commit is contained in:
parent
50754b9d33
commit
3dac7e9226
@ -123,12 +123,17 @@ def token() -> Response | dict:
|
|||||||
host_url = _host_url_without_root_path()
|
host_url = _host_url_without_root_path()
|
||||||
private_key = OpenIdConfigsForDevOnly.private_key
|
private_key = OpenIdConfigsForDevOnly.private_key
|
||||||
|
|
||||||
|
# this is just for testing. there is no need to expire tokens rapidly.
|
||||||
|
one_hour = 3600
|
||||||
|
one_day = one_hour * 24
|
||||||
|
two_days = one_day * 2
|
||||||
|
|
||||||
id_token = jwt.encode(
|
id_token = jwt.encode(
|
||||||
{
|
{
|
||||||
"iss": f"{host_url}{url_for('openid.index')}",
|
"iss": f"{host_url}{url_for('openid.index')}",
|
||||||
"aud": client_id,
|
"aud": client_id,
|
||||||
"iat": math.floor(time.time()),
|
"iat": math.floor(time.time()),
|
||||||
"exp": round(time.time()) + 3600,
|
"exp": round(time.time()) + two_days,
|
||||||
"sub": user_name,
|
"sub": user_name,
|
||||||
"email": user_details["email"],
|
"email": user_details["email"],
|
||||||
"preferred_username": user_details.get("preferred_username", user_name),
|
"preferred_username": user_details.get("preferred_username", user_name),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user