In the LoginBean class we have this.username to get the logged in user. I want to know the GROUP of the logged in user in that class. Is there any api to get the Groupname… Plz reply …Do you want more clarification.
If I understand well, you can take a look at the AuthorityService. You can use the method getAuthorities() to retrieve all authorities for the user or getAuthoritiesForUser(String userName). After that, filter the names that start with the GROUP_ prefix.