Annotation Interface RequiresScope


@Inherited @Retention(RUNTIME) public @interface RequiresScope
Declares that a method on a JAX-RS resource may only be executed if the incoming request is authorized for the scopes given in the value of the annotation. When used on JAX-RS resource class, all methods without the annotation inherit the resource class annotation.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the list of scopes requiring authorization to execute this method.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Returns true if the returned scopes in value() must all be authorized.
  • Element Details

    • value

      String[] value
      Returns the list of scopes requiring authorization to execute this method.
      Returns:
      the scopes
    • allNeeded

      boolean allNeeded
      Returns true if the returned scopes in value() must all be authorized. This defaults to true.
      Returns:
      true if all specified scopes must be authorized; false otherwise
      Default:
      true