Annotation Interface RequiresRole


@Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface RequiresRole
Declares a required caller role for a service or method.

The annotation is safe descriptor metadata. Runtime enforcement occurs only when the generated descriptor is connected to the configured authorization policy or when application code explicitly evaluates it. The role value is not a credential and must not be treated as proof of caller identity.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Required role.
  • Element Details

    • value

      String value
      Required role.
      Returns:
      role name