Skip to content
New issue

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

通过OAuth接入keycloak认证 #92

Open
wang65535 opened this issue Dec 4, 2020 · 1 comment
Open

通过OAuth接入keycloak认证 #92

wang65535 opened this issue Dec 4, 2020 · 1 comment

Comments

@wang65535
Copy link

在拿到 access_token 后,获取用户信息时,keycloak 返回 token not provide 错误。我看了一下代码,access_token是当作参数传入的,但是keycloak 的请求方式要 token 写在 header 的 Authorization 字段里

@zhouruicn
Copy link
Collaborator

zhouruicn commented Mar 12, 2021

在代码中有针对Header的判断
if (StringUtils.isEmpty(accessToken)) {
String bearer = request.getHeader(HttpToken.X_Authorization);
if (StringUtils.isNotEmpty(bearer)) {
accessToken = StringUtils.substringAfter(bearer, " ");
}
}
2b318c3

请提供一下您那里的信息,是否是格式不匹配.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants