Annotation Interface PropagateToken


@ExperimentalJSentinelApi("V00.74 token propagation; stable promotion staged for V00.76") @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface PropagateToken
Marker for client interfaces / methods whose outbound HTTP call must carry a PropagateTokenAdvisor-resolved header (typically the Bearer token of the current subject, optionally exchanged via TokenExchangeStrategy).

Meta-annotated with @JSentinelAnnotation(PropagateTokenAdvisor.class) so the V00.70 JSentinelAnnotationScanner discovers it through the same cache as @RequiresRole / @RequiresPermission.

Resolution at runtime (V00.74 Prompts 008 + 011 + 013):

  • Method-level annotation overrides class-level. Identical to the @RequiresRole resolution rule.
  • strategy() is the lookup key against the named strategies registered in the bootstrap .propagation(p -> p.strategy(name, ...)).
  • audience() flows into OutboundCall so strategy implementations (in particular TokenExchangeStrategy) know which downstream audience to mint a token for.
  • header() overrides the strategy's default header name (e.g. "X-Service-Token" for a custom flow).
  • service() is a logical service name used in diagnostics / audit metadata.
Since:
00.74.00
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Declared audience for the downstream call.
    Override of the strategy's default header name.
    Logical service name for diagnostics / audit metadata.
    Lookup key against the named strategies.
  • Element Details

    • strategy

      String strategy
      Lookup key against the named strategies. Default "pass-through".
      Default:
      "pass-through"
    • audience

      String audience
      Declared audience for the downstream call. Default empty.
      Default:
      ""
    • header

      String header
      Override of the strategy's default header name. Default empty (use strategy default).
      Default:
      ""
    • service

      String service
      Logical service name for diagnostics / audit metadata. Default empty.
      Default:
      ""