We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前代码中实现了token刷新,但是刷新后的token并没有返回给客户端,导致下次请求时发生token无效
// 检查缓存的token是否有效且自动刷新缓存token func (m *GfToken) IsEffective(ctx context.Context, token string) bool { cacheToken, key, err := m.getTokenData(ctx, token) if err != nil { g.Log().Info(ctx, err) return false } _, code := m.IsNotExpired(cacheToken.JwtToken) if JwtTokenOK == code { // 刷新缓存 if m.IsRefresh(cacheToken.JwtToken) { return m.doRefresh(ctx, key, cacheToken) } return true } return false }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
目前代码中实现了token刷新,但是刷新后的token并没有返回给客户端,导致下次请求时发生token无效
// 检查缓存的token是否有效且自动刷新缓存token
func (m *GfToken) IsEffective(ctx context.Context, token string) bool {
cacheToken, key, err := m.getTokenData(ctx, token)
if err != nil {
g.Log().Info(ctx, err)
return false
}
_, code := m.IsNotExpired(cacheToken.JwtToken)
if JwtTokenOK == code {
// 刷新缓存
if m.IsRefresh(cacheToken.JwtToken) {
return m.doRefresh(ctx, key, cacheToken)
}
return true
}
return false
}
The text was updated successfully, but these errors were encountered: