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:
parent
b3d177fc7e
commit
ea148d5fee
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue