我想通过 Keycloak RestAPI 更新/添加密码策略。
我浏览了文档,但看起来我只能通过 API 检索密码策略列表。还有其他可能的方式让我可以通过 Rest API 处理密码策略吗?
https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_serverinforepresentation
https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_passwordpolicytyperepresentation
我正在使用 Keycloak 11。
更新: 我设法找出密码策略值位于领域表下的密码策略列内。我认为我可能需要重新启动 Keycloak,或使用https://www.keycloak.org/docs-api/11.0/rest-上的 Keycloak Rest API (POST /{realm}/clear-realm-cache) 清除 Keycloak 缓存api/index.html使其在更新表后工作。
假设我通过openid-connect成功登录后收到了令牌
http://xxxxxx/auth/realms/demo/protocol/openid-connect/token
{
"access_token": "xxxxxx",
"expires_in": 600,
"refresh_expires_in": 1800,
"refresh_token": "xxxxxx",
"token_type": "bearer",
"not-before-policy": xxxx,
"session_state": "xxxxx",
"scope": "email profile"
}
Run Code Online (Sandbox Code Playgroud)
有没有办法像https://jwt.io/那样使用 PHP解码 jwt 令牌的有效负载?谢谢。