I have created resources in Keycloak with scopes, policies, and permissions. Now, I would like to store the resources associated with the roles in the payload of the user token based on their roles. How can I achieve this in the latest version of Keycloak?
Currently, I am setting the resource by creating a user attribute, but I am hardcoding the resource at the moment. However, I have already created resources according to the roles assigned to the user, so I want all of these resources to be included in the token.