keycloak - 生成 Keycloak 离线令牌
问题描述
我是 Keycloak 身份和用户管理的新手。我主要是在寻找一种生成离线令牌的方法。
目前我有授权 URL、访问令牌请求和刷新令牌请求为了生成离线令牌,我们需要添加额外的参数作为scope=offline_access 我不知道为什么在我的情况下它没有生成,因为我已经验证了不记名令牌jwt.io 的“典型”不是“离线”。
访问令牌请求是
curl \
-d "client_id=<my-client-id>" -d "client_secret=<client-secret>" \
-d "username=<user>" -d "password=<pass>" \
-d "grant_type=password" \
-d "scope=openid info offline_access" \
https://localhost:8080/auth/realms/demo/protocol/openid-connect/token | jq
Method: POST
URL: https://keycloak.example.com/auth/realms/myrealm/protocol/openid-connect/token
Body type: x-www-form-urlencoded
Form fields:
client_id : <my-client-name>
grant_type : refresh_token
refresh_token: <my-refresh-token>
请建议
解决方案
推荐阅读
- yii2 - Yii2客户端验证刷新表单提交页面
- java - 如何在没有 Sonarqube 问题的情况下在 spring 中自动连接静态字段?
- ajax - AJAX成功的Django渲染模板
- pandas - 熊猫适用于索引
- windows - 复制Windows cmd中按条件选择的多个文件
- sql - 返回连接到 SQL 表中特定 ClientID 的最大用户数
- mysql - 使用 where 子句时 Group_concat 不显示所有值
- android - 如何允许电子邮件 ID 在 Firebase 中接收 OTP 以进行身份验证
- c# - MVC Razor 5:模型作为 null 从视图传递给控制器
- java - Scala - 将大数或科学数转换为 Long