Java Api抱怨使用KeyClope降级时没有推荐人

Java Api抱怨使用KeyClope降级时没有推荐人,java,keycloak,Java,Keycloak,根据上的文档,我正在尝试使用KeyClope保护jetty上运行的api服务 我已经创建了一个客户端用户svc,它在keydove中安装了以下内容: { "realm": "databaker", "bearer-only": true, "auth-server-url": "http://localhost:8080/auth/", "ssl-required&quo

根据上的文档,我正在尝试使用KeyClope保护jetty上运行的api服务

我已经创建了一个客户端用户svc,它在keydove中安装了以下内容:

{
  "realm": "databaker",
  "bearer-only": true,
  "auth-server-url": "http://localhost:8080/auth/",
  "ssl-required": "external",
  "resource": "user-svc",
  "confidential-port": 0
}
jetty web.xml
配置:


数据采集器
用户svc
http://localhost:8080/auth/
外部的
真的
0
web.xml


用户svc
io.databaker.UserSvcServlet


我做错了什么?

您是否知道您在
jetty web.xml
中指定了
localhost:8080
,并使用
http://localhost:9090
何时运行服务?请尝试
java-jar start.jar-Djetty.http.port=8080
keydape正在
localhost:8080
地址上运行,这就是我在
jetty web.xml
上指定的原因。api服务正在
http://localhost:9090
。你的建议告诉我:
地址已经在使用中了
。我相信链中有代理,不是吗?你能确认一下吗?并最终提供完整的请求序列和后续响应(如有可能,作为curl脚本和输出)。如果您在适配器配置中将客户端设置为ssl required=none(+删除行机密端口:0),那么检查行为也可能很有趣。您是否知道您正在
jetty web.xml
中指定
localhost:8080
,并使用
http://localhost:9090
何时运行服务?请尝试
java-jar start.jar-Djetty.http.port=8080
keydape正在
localhost:8080
地址上运行,这就是我在
jetty web.xml
上指定的原因。api服务正在
http://localhost:9090
。你的建议告诉我:
地址已经在使用中了
。我相信链中有代理,不是吗?你能确认一下吗?并最终提供完整的请求序列和后续响应(如有可能,作为curl脚本和输出)。如果将客户端设置为ssl required=none以及在适配器配置中(+删除行机密端口:0),检查行为也可能很有趣。
java -jar start.jar -Djetty.http.port=9090
2020-07-13 10:20:16 INFO  log:169 - Logging initialized @230ms to org.eclipse.jetty.util.log.Slf4jLog
2020-07-13 10:20:17 WARN  HomeBaseWarning:72 - This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended.  See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2020-07-13 10:20:17 INFO  Server:360 - jetty-9.4.29.v20200521; built: 2020-05-21T17:20:40.598Z; git: 77c232aed8a45c818fd27232278d9f95a021095e; jvm 11.0.7+10-LTS
2020-07-13 10:20:17 INFO  ScanningAppProvider:128 - Deployment monitor [file:///home/developer/playground/user-svc-env/jetty-svc/webapps/] at interval 1
2020-07-13 10:20:18 INFO  AnnotationConfiguration:473 - Scanning elapsed time=588ms
2020-07-13 10:20:18 INFO  session:334 - DefaultSessionIdManager workerName=node0
2020-07-13 10:20:18 INFO  session:339 - No SessionScavenger set, using defaults
2020-07-13 10:20:18 INFO  session:140 - node0 Scavenging every 600000ms
2020-07-13 10:20:18 INFO  ContextHandler:849 - Started o.e.j.w.WebAppContext@14dd7b39{root,/,file:///tmp/jetty-0_0_0_0-9090-root_war-_-any-934191447021540237.dir/webapp/,AVAILABLE}{/home/developer/playground/user-svc-env/jetty-svc/webapps/root.war}
2020-07-13 10:20:18 INFO  AbstractConnector:331 - Started ServerConnector@18ca3c62{HTTP/1.1, (http/1.1)}{0.0.0.0:9090}
2020-07-13 10:20:18 INFO  Server:400 - Started @1892ms