How to include Authorization Extension data (groups/roles/permissions) into issued tokens?

There’s still some mystery around. How to check in the backend(ex: Spring boot) custom claim?

  JwtWebSecurityConfigurer
                    .forRS256(apiAudience, issuer)
                    ...
                    .antMatchers(GET, "/private").hasRole("MY_CUSTOM_ROLE")

It does not read from the custom defined namespace.