I have got a accessToken by calling the keycloak endpoint /token
using REST Api as follows
curl -d 'client_id=myclient' -d 'username=username' -d 'password=password' -d 'grant_type=password' -d 'scope=openid' -d 'client_secret=xxxxxxxxxxxxxxxxxxxxxxxxx' 'http://192.168.43.29:8080/realms/aurcc/protocol/openid-connect/token'
But by using this api, when a request is made to the /userinfo
endpoint, response will only contains sub,given_name,preferred_name,email_verified,family_name. But the response doesn't contain any information about the groups in which the user is added.
Next time, I used keycloak-js adapter in my Vuejs application. There the /userinfo
endpoint results in a response which contains the above said attributes plus the groups
attribute. I don't why this weird thing happening.
Help me to get the groups
attribute in the response of /userinfo
endpoint.