Documentation ¶
Index ¶
Constants ¶
View Source
const TokenExpireDuration = time.Hour * 2
TokenExpireDuration Token过期时间
Variables ¶
This section is empty.
Functions ¶
func RefreshToken ¶
RefreshToken 刷新 Access Token 的接口 return (newAToken, newRToken string, err error) 如果我们邀请能够续token, 那就每次请求都返回一个新的Refreshtoken,这样就会和循环自动续上refreshtoken的有效期 如果我们希望refresh到期强制重新登录,不希望能够续token的话,可以只返回新的Accress Token,refreshtoken返回旧的
Types ¶
Click to show internal directories.
Click to hide internal directories.