Skip to content

Commit 0462c42

Browse files
committed
Update Test Controllers
Closes gh-9121
1 parent 21f7187 commit 0462c42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config/src/test/java/org/springframework/security/config/http/MiscHttpConfigTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -822,19 +822,19 @@ public String customKey() {
822822
@RestController
823823
static class AuthenticationController {
824824
@GetMapping("/password")
825-
public String password(@AuthenticationPrincipal Authentication authentication) {
825+
public String password(Authentication authentication) {
826826
return (String) authentication.getCredentials();
827827
}
828828

829829
@GetMapping("/roles")
830-
public String roles(@AuthenticationPrincipal Authentication authentication) {
830+
public String roles(Authentication authentication) {
831831
return authentication.getAuthorities().stream()
832832
.map(GrantedAuthority::getAuthority)
833833
.collect(Collectors.joining(","));
834834
}
835835

836836
@GetMapping("/details")
837-
public String details(@AuthenticationPrincipal Authentication authentication) {
837+
public String details(Authentication authentication) {
838838
return authentication.getDetails().getClass().getName();
839839
}
840840
}

0 commit comments

Comments
 (0)