2
0
Эх сурвалжийг харах

Update Test Controllers

Closes gh-9121
Josh Cummings 4 жил өмнө
parent
commit
b1a3aef4f8

+ 3 - 3
config/src/test/java/org/springframework/security/config/http/MiscHttpConfigTests.java

@@ -802,18 +802,18 @@ public class MiscHttpConfigTests {
 	static class AuthenticationController {
 
 		@GetMapping("/password")
-		String password(@AuthenticationPrincipal Authentication authentication) {
+		String password(Authentication authentication) {
 			return (String) authentication.getCredentials();
 		}
 
 		@GetMapping("/roles")
-		String roles(@AuthenticationPrincipal Authentication authentication) {
+		String roles(Authentication authentication) {
 			return authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority)
 					.collect(Collectors.joining(","));
 		}
 
 		@GetMapping("/details")
-		String details(@AuthenticationPrincipal Authentication authentication) {
+		String details(Authentication authentication) {
 			return authentication.getDetails().getClass().getName();
 		}
 

+ 1 - 1
config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt

@@ -176,7 +176,7 @@ class OpaqueTokenDslTests {
     @RestController
     class AuthenticationController {
         @GetMapping("/authenticated")
-        fun authenticated(@AuthenticationPrincipal authentication: Authentication): String {
+        fun authenticated(authentication: Authentication): String {
             return authentication.name
         }
     }