We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
测试用例报错 === RUN TestGroupAuthPath gtoken_test.go:41: Group auth path test gtoken_test.go:67: error: /system/test auth path error --- FAIL: TestGroupAuthPath (0.00s) FAIL
The text was updated successfully, but these errors were encountered:
原因是:没有对退出登录接口判断是否配置了。没配置就会有点小问题。 if m.MiddlewareType == MiddlewareTypeGroup { if gstr.HasSuffix(urlPath, m.LoginPath) || gstr.HasSuffix(urlPath, m.LogoutPath) { return false } }
应该改为 // 分组拦截,登录接口不拦截, 配置了退出登录接口不拦截 if m.MiddlewareType == MiddlewareTypeGroup { if gstr.HasSuffix(urlPath, m.LoginPath) || (m.LogoutPath != "" && gstr.HasSuffix(urlPath, m.LogoutPath)) { return false } }
Sorry, something went wrong.
代码初始化有对m.LogoutPath == ""进行校验,难道你的m.LogoutPath为空?
已添加
No branches or pull requests
测试用例报错
=== RUN TestGroupAuthPath
gtoken_test.go:41: Group auth path test
gtoken_test.go:67: error: /system/test auth path error
--- FAIL: TestGroupAuthPath (0.00s)
FAIL
The text was updated successfully, but these errors were encountered: