File tree 1 file changed +3
-3
lines changed
config/src/test/java/org/springframework/security/config/http
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -822,19 +822,19 @@ public String customKey() {
822
822
@ RestController
823
823
static class AuthenticationController {
824
824
@ GetMapping ("/password" )
825
- public String password (@ AuthenticationPrincipal Authentication authentication ) {
825
+ public String password (Authentication authentication ) {
826
826
return (String ) authentication .getCredentials ();
827
827
}
828
828
829
829
@ GetMapping ("/roles" )
830
- public String roles (@ AuthenticationPrincipal Authentication authentication ) {
830
+ public String roles (Authentication authentication ) {
831
831
return authentication .getAuthorities ().stream ()
832
832
.map (GrantedAuthority ::getAuthority )
833
833
.collect (Collectors .joining ("," ));
834
834
}
835
835
836
836
@ GetMapping ("/details" )
837
- public String details (@ AuthenticationPrincipal Authentication authentication ) {
837
+ public String details (Authentication authentication ) {
838
838
return authentication .getDetails ().getClass ().getName ();
839
839
}
840
840
}
You can’t perform that action at this time.
0 commit comments