How to check user roles in custom rest api

we built a custom RealmResourceProvider to add some api.
It works but we don’t know how to check the current user roles.

We only have the KeycloakSession and cannot find any method to validate the user roles or to get the required info to build the Auth service.

The @RolesAllowed is not working