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
@RequiresRoleresolution rule. strategy()is the lookup key against the named strategies registered in the bootstrap.propagation(p -> p.strategy(name, ...)).audience()flows intoOutboundCallso strategy implementations (in particularTokenExchangeStrategy) 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