mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-14 12:14:46 +00:00
allow local test tokens to last 24 hours
This commit is contained in:
parent
ae6f3119bb
commit
1f6ca8b727
@ -69,6 +69,7 @@ class UserModel(SpiffworkflowBaseDBModel):
|
|||||||
if secret_key is None:
|
if secret_key is None:
|
||||||
raise KeyError("we need current_app.config to have a SECRET_KEY")
|
raise KeyError("we need current_app.config to have a SECRET_KEY")
|
||||||
|
|
||||||
|
one_day_in_seconds = 86400
|
||||||
# hours = float(app.config['TOKEN_AUTH_TTL_HOURS'])
|
# hours = float(app.config['TOKEN_AUTH_TTL_HOURS'])
|
||||||
base_payload = {
|
base_payload = {
|
||||||
"email": self.email,
|
"email": self.email,
|
||||||
@ -76,7 +77,7 @@ class UserModel(SpiffworkflowBaseDBModel):
|
|||||||
"sub": f"service:{self.service}::service_id:{self.service_id}",
|
"sub": f"service:{self.service}::service_id:{self.service_id}",
|
||||||
"iss": self.__class__.spiff_generated_jwt_issuer(),
|
"iss": self.__class__.spiff_generated_jwt_issuer(),
|
||||||
"iat": math.floor(time.time()),
|
"iat": math.floor(time.time()),
|
||||||
"exp": round(time.time()) + 3600,
|
"exp": round(time.time()) + one_day_in_seconds,
|
||||||
"aud": SPIFF_GENERATED_JWT_AUDIENCE,
|
"aud": SPIFF_GENERATED_JWT_AUDIENCE,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user