Annotation Interface RequireGatewayUser


@Target({METHOD,TYPE}) @Retention(RUNTIME) public @interface RequireGatewayUser
Marks a controller method or class as requiring a valid gateway user (X-User-Id and X-User-Role headers). Requests without valid headers will be rejected with 401 Unauthorized. When used on a class, all handler methods in that class require the user. Method-level annotation overrides class-level. example:
 
 @RequireGatewayUser
 public class AdminController {
     @GetMapping("/dashboard")
     public String dashboard(
         @RequestAttribute GatewayUser user
     ) { ... }
 }