Returns the principal's name, as obtained from the SecurityContextHolder. Properly handles
both String-based and UserDetails-based principals.
the username or null if unavailable
Will
always return false if the SecurityContextHolder contains an
Authentication with nullprincipal and/or GrantedAuthority[]
objects.
Parameters: role - the GrantedAuthorityString representation to check for true if an exact (case sensitive) matching granted authority is located,false otherwise
Methods inherited from javax.servlet.http.HttpServletRequestWrapper