我正在尝试通过REST API创建一个新用户,并且正在发送此POST
POST / admin / realms / myrealm / users
标题: 授权:不记名(生成令牌,此部分可以) 内容类型:application / json
身体:
{
"username": "rahul",
"enabled": true,
"totp": false,
"emailVerified": false,
"firstName": "rahul",
"lastName": "borse",
"email": "rahulborse@yahoo.com",
"credentials": [
{
"type": "password",
"value": "rahul"
}
]
}
我正常创建了用户,但是密码不起作用 登录后声称我的凭证无效。
答案 0 :(得分:0)
尝试将映射"temporary": false
添加到credentials
:
{
"username": "rahul",
"enabled": true,
"totp": false,
"emailVerified": false,
"firstName": "rahul",
"lastName": "borse",
"email": "rahulborse@yahoo.com",
"credentials": [
{
"type": "password",
"value": "rahul",
"temporary": false
}
]
}