Annotation Interface AuthConstraint


@Target({METHOD,TYPE}) @Retention(RUNTIME) public @interface AuthConstraint
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The description of this constraint (which can be displayed to users to help explain why they have been denied access)
    The id of this authentication constraint; designed to allow configuration to override the constraints in the annotation
    A list of roles, one of which the user must have.
    boolean
    If true, authentication will not be enforced on calls made to the annotation target
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • id

      String id
      The id of this authentication constraint; designed to allow configuration to override the constraints in the annotation
      Returns:
      Default:
      "default"
    • skip

      boolean skip
      If true, authentication will not be enforced on calls made to the annotation target
      Returns:
      Default:
      false
    • role

      String[] role
      A list of roles, one of which the user must have. Defaults to "user". If the user does not hold this role then an authentication exception will be raised
      Returns:
      Default:
      {"user"}
    • comment

      String comment
      The description of this constraint (which can be displayed to users to help explain why they have been denied access)
      Returns:
      Default:
      ""