简体   繁体   English

Keycloak错误invalid_client仅允许承载

[英]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.

相关问题 发送okhttp请求时:HTTP错误405和invalid_client - When sending okhttp request: HTTP ERROR 405 and invalid_client 为什么我仍然收到invalid_client错误? - Why am I still getting invalid_client error? invalid_client 用于使用苹果登录 - invalid_client for sign in with apple oauth2 android中jsonresponse中的invalid_client - invalid_client in jsonresponse in oauth2 android Spring 授权服务器 1.0.0:请求 /oauth2/token 时出现 invalid_client 错误 - Spring Authorization Server 1.0.0: invalid_client error while requesting /oauth2/token 尝试撤销 Spring 授权服务器中的访问令牌时出现 invalid_client 错误 - Getting invalid_client error when trying to revoke an access token in Spring Authorization Server spring-security-oauth2-authorization-server:0.1.1 获取令牌错误 invalid_client - spring-security-oauth2-authorization-server:0.1.1 get token error invalid_client Wildfly 中仅承载身份验证,不使用 Keycloak - Bearer only authentication in Wildfly without using Keycloak 使用带有 Spring 引导 + Keycloak 的不记名令牌时出现错误 500 - Error 500 while using bearer token with Spring boot + Keycloak invalid_client 在使用 java spring 后端代码请求 Amazon Cognito 令牌时 - invalid_client when requesting Amazon Cognito token with code from java spring back end
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM