gpt4 book ai didi

oauth-2.0 - Keycloak JAX-RS 和 Postman 授权(Auth URL)

转载 作者:行者123 更新时间:2023-12-02 23:26:48 36 4
gpt4 key购买 nike

我有 jax-rs 的资源并使用 keycloak我想通过 Postman 获取 token

这是 jax-rs (keycloak-quickstart) 的数据库客户端

{
"realm": "demo",
"bearer-only": true,
"auth-server-url": "http://localhost:8080/auth",
"ssl-required": "external",
"resource": "database-service"
}

我为 Postman 创建了一个客户端

{
"realm": "demo",
"auth-server-url": "http://localhost:8080/auth",
"ssl-required": "external",
"resource": "client-postman",
"credentials": {
"secret": "b53f32d3-e15b-474b-a88d-1f1cfa68c2dc"
}
}

我选择了OAuth 2.0类型 enter image description here

访问 token 的 URL 是

http://localhost:8080/auth/realms/demo/protocol/openid-connect/token

但我不知道auth url是什么 enter image description here

最佳答案

使用当前版本的 Postman 和 keycloak 2.2.1.Final 我已成功设置 OAuth 2.0

Postman setup for keycloak

客户端 key :不是必需的,但据我所知,您可以在客户端中设置它,然后您必须在此处提供它

身份验证网址:https://{KEYCLOAK}/auth/realms/{REALM}/protocol/openid-connect/auth

token 网址:https://{KEYCLOAK}/auth/realms/{REALM}/protocol/openid-connect/token

您可以从以下位置获取这些网址https://{KEYCLOAK}/auth/realms/{REALM}/.well-known/openid-configuration

关于oauth-2.0 - Keycloak JAX-RS 和 Postman 授权(Auth URL),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45841479/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com