Annotation Interface Secured


Used to mark a route as requiring authorization before execution. When the annotation is placed on a method, it overrides the value of the annotation at the class level, if it exists.
Since:
1.0
Author:
James Kleeh
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The values supplied will be used to secure the target.
  • Element Details

    • value

      String[] value
      The values supplied will be used to secure the target. The values will be compared using "OR". If the authenticated principal contains any of the roles or tokens provided, the principal will be authorized to access the resource. The values can be a role (eg ROLE_ADMIN), or a token. See io.micronaut.security.rules.SecurityRule for other supported values.
      Returns:
      The list of roles or tokens