File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
java/org/springframework/security/config/http
kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -802,18 +802,18 @@ String customKey() {
802
802
static class AuthenticationController {
803
803
804
804
@ GetMapping ("/password" )
805
- String password (@ AuthenticationPrincipal Authentication authentication ) {
805
+ String password (Authentication authentication ) {
806
806
return (String ) authentication .getCredentials ();
807
807
}
808
808
809
809
@ GetMapping ("/roles" )
810
- String roles (@ AuthenticationPrincipal Authentication authentication ) {
810
+ String roles (Authentication authentication ) {
811
811
return authentication .getAuthorities ().stream ().map (GrantedAuthority ::getAuthority )
812
812
.collect (Collectors .joining ("," ));
813
813
}
814
814
815
815
@ GetMapping ("/details" )
816
- String details (@ AuthenticationPrincipal Authentication authentication ) {
816
+ String details (Authentication authentication ) {
817
817
return authentication .getDetails ().getClass ().getName ();
818
818
}
819
819
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ class OpaqueTokenDslTests {
176
176
@RestController
177
177
class AuthenticationController {
178
178
@GetMapping(" /authenticated" )
179
- fun authenticated (@AuthenticationPrincipal authentication : Authentication ): String {
179
+ fun authenticated (authentication : Authentication ): String {
180
180
return authentication.name
181
181
}
182
182
}
You can’t perform that action at this time.
0 commit comments