How to get a list of user roles as grant authorities list

Friends, I am new to working with keycloak. I have users, there are roles assigned to users. How can I get the list of roles not inside jsonArray claims but inside Grant Authorities list in Principal or Authorization class ?