Avoid toString in favor of getName for extract sid

There are some more sophisticated implementations of `getName` in `AbstractAuthenticationToken`  and other `Authentication` classes.
This commit is contained in:
杨博 (Yang Bo) 2019-01-07 10:42:04 +08:00 committed by Eleftheria Stein
parent b3d177fc7e
commit ea148d5fee
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ public class PrincipalSid implements Sid {
this.principal = ((UserDetails) authentication.getPrincipal()).getUsername();
}
else {
this.principal = authentication.getPrincipal().toString();
this.principal = authentication.getName();
}
}