@ JsonIgnore public Collection < ? extends GrantedAuthority > getAuthorities ( ) { if ( user . isAdmin ( ) ) { return Collections . singleton ( new SimpleGrantedAuthority ( Roles . ADMIN . toString ( ) ) ) ; } else if ( user . isModerator ( ) ) { return Collections . singleton ( new SimpleGrantedAuthority ( Roles . MOD . toString ( ) ) ) ; } else { return Collections . singleton ( new SimpleGrantedAuthority ( Roles . USER . toString ( ) ) ) ; } }
A list of roles for this user .