Hi All,
I am trying to add a protocol mapper using kcadm for a test user attribute. I have done the following:
1. Logged in as an admin user
2. Create a test user, with attribute 'test'
./kcadm.sh create users -s username=testuser1 -s enabled=true -s 'attributes.test=test' -r master
3. Create a protocol mapper for attribute 'test' to a client with id 'app-jsp'
./kcadm.sh create clients/app-jsp/protocol-mappers/models -f - << 'EOF'
{
"protocol":"openid-connect",
"name": "test",
"protocolMapper": "oidc-usermodel-attribute-mapper",
"config": {
"user.attribute":"test",
"
claim.name":"test",
"jsonType.label": "",
"access.token.claim": true,
"userinfo.token.claim": false,
"multivalued": true
}
}
EOF
The client with client-id 'app-jsp' is present under the 'master' realm.
Thanks,
Pritha