Add user's roles from external database to jwt token

Hi, everyone
I am getting jwt token of user from remote database with user federation provider, but jwt does not have realm-access
in my own provider i have this method

private UserModel createUserModel(String login, RealmModel realmModel) {

    return new AbstractUserAdapter(keycloakSession, realmModel, componentModel) {

        public Set<RoleModel> getRoleMappings() {
            System.out.println("enter in getRoleMappings");
            Set<RoleModel> rolesToAssign = new HashSet<>();
            if (appendDefaultRolesToRoleMappings()) {
            return rolesToAssign;

        public String getUsername() {
            return login;
        public String getEmail() {
            System.out.println("enter in getEmail");
            return userService.getAdmin(login).getEmail();

But it does not work. There is field email in jwt, but not realm access
Also there is no “enter in getRoleMappings” in console when i invoke createUserModel method
It looks like programm ignore public Set getRoleMappings()
Thanks for help