Class PassThroughStrategy
java.lang.Object
com.svenruppert.jsentinel.credential.propagation.PassThroughStrategy
- All Implemented Interfaces:
OutboundTokenStrategy
@ExperimentalJSentinelApi
public final class PassThroughStrategy
extends Object
implements OutboundTokenStrategy
Default
OutboundTokenStrategy — forwards a bearer-style
inbound token as Authorization: Bearer <value>.
Discipline:
RefreshTokenis never forwarded (Class-A secret, would leak via the outbound call).ApiKeyis not prefixed withBearer. Consumers register their ownApiKeyHeaderStrategywhen they want one.
Stateless singleton — share INSTANCE across threads.
- Since:
- 00.74.00
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PassThroughStrategySingleton instance — share across threads.static final StringStable lookup key under which the strategy registers. -
Method Summary
Modifier and TypeMethodDescriptionname()resolve(OutboundCall call, Optional<TokenCredential> inbound)
-
Field Details
-
NAME
-
INSTANCE
Singleton instance — share across threads.
-
-
Method Details
-
name
- Specified by:
namein interfaceOutboundTokenStrategy- Returns:
- stable lookup key (e.g.
"pass-through","exchange"); used by@PropagateToken(strategy = …)
-
resolve
- Specified by:
resolvein interfaceOutboundTokenStrategy- Parameters:
call- the outbound call about to fireinbound- the current inbound credential, if any- Returns:
- the header to bind, or empty to skip
-