Annotation Interface UnauthorizedEndpoint


@Target({METHOD,TYPE}) @Retention(RUNTIME) @Documented public @interface UnauthorizedEndpoint
Marks a REST endpoint as deliberately unsecured and exempt from security validation checks.

Use this on endpoint methods (or an entire controller class) to signal that the endpoint intentionally requires no authentication/authorization, and to suppress the build-time validate-rest-security plugin check.

Example usage:

 @RestController
 public class HealthController {

     @UnauthorizedEndpoint("Public health check")
     @GetMapping("/health")
     public ResponseEntity<String> health() {
         return ResponseEntity.ok("OK");
     }
 }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional description explaining why this endpoint is unsecured.
  • Element Details

    • value

      String value
      Optional description explaining why this endpoint is unsecured.
      Default:
      ""