[英]Keycloak error invalid_client Bearer only not allowed
I'm trying to deploy a very simple REST service secured with keycloak and am getting the following error: 我正在尝试部署一个使用keycloak保护的非常简单的REST服务,并且收到以下错误:
Caused by: org.keycloak.authorization.client.util.HttpResponse.Exception: Unexpected response from server: 400 / Bad Request / Response from server: ("error":"invalid_client","error_description":"Bearer-only not allowed")
引起:org.keycloak.authorization.client.util.HttpResponse.Exception:来自服务器的意外响应:400 /来自服务器的错误请求/响应:(“error”:“invalid_client”,“error_description”:“仅允许承载” “)
What does this error mean? 这个错误是什么意思? How can I fix it?
我该如何解决?
Since you have not shared your keycloak config, I am guessing the above error is because you created a bearer only client in keycloak. 由于你还没有共享你的keycloak配置,我猜测上面的错误是因为你在keycloak中创建了一个仅承载客户端。 Keycloak doesn't allow "bearer only" clients to obtain tokens from the server.
Keycloak不允许“仅承载”客户端从服务器获取令牌。 Try to change your client to "confidential" on the server and set bearer-only on your adapter configuration (keycloak.json).
尝试在服务器上将客户端更改为“机密”,并在适配器配置(keycloak.json)上设置仅限承载。
You can refer this thread for more info: http://keycloak-user.88327.x6.nabble.com/keycloak-user-can-we-use-authorization-with-bearer-only-td2123.html 您可以参考此主题获取更多信息: http : //keycloak-user.88327.x6.nabble.com/keycloak-user-can-we-use-authorization-with-bearer-only-td2123.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.