Authentication authentication = (Authentication) principal;
Set<String> roles = Collections.synchronizedSet(new HashSet<String>());
for (GrantedAuthority ga : authentication.getAuthorities()) {
Authentication authentication = (Authentication) principal;
Set<String> roles = Collections.synchronizedSet(new HashSet<String>());
for (GrantedAuthority ga : authentication.getAuthorities()) {