mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-05 18:22:26 +00:00
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();
|
this.principal = ((UserDetails) authentication.getPrincipal()).getUsername();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.principal = authentication.getPrincipal().toString();
|
this.principal = authentication.getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user