Annotation Interface Authentication


@Target({METHOD,TYPE}) @Retention(RUNTIME) @Inherited public @interface Authentication
Annotation used to indicate that authentication is required for the annotated element. This annotation can be applied to methods or classes in Spring RestController.

Example usage:


 @RestController
 @Authentication
 public class SecureResource {
     @GetMapping
     public ResponseEntity getSecureResource() {
         // Code here
     }
 }
 

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      String[] value
      Default:
      {"QUICK"}