自定义配置token过期时间:
JWT_AUTH = {
'JWT_RESPONSE_PAYLOAD_HANDLER': 'app02.utils.my_jwt_response_payload_handler',
# 自定配置token过期时间
# days: float = ...,
# seconds: float = ...,
# microseconds: float = ...,
# milliseconds: float = ...,
# minutes: float = ...,
# hours: float = ...,
# weeks: float = ...,
'JWT_RESPONSE_DELTA': datetime.timedelta(days=7) # 过期时间,手动配置
}
标签:...,配置,登录,过期,float,JWT,token From: https://www.cnblogs.com/vless/p/17281523.html