Interface TokenCredential
- All Known Implementing Classes:
ApiKey, BearerToken, OidcAccessToken, RefreshToken
@ExperimentalJSentinelApi("V00.74 token propagation; stable promotion staged for V00.76")
public sealed interface TokenCredential
permits BearerToken, OidcAccessToken, RefreshToken, ApiKey
Sealed type for inbound / outbound tokens flowing through the V00.74
token-propagation pipeline.
Four permits cover the realistic shapes:
BearerToken— opaque bearer token carried inAuthorization: Bearer ….OidcAccessToken— OIDC access token, semantically a bearer with an issuer claim.RefreshToken— class-A refresh secret; never forwarded byPassThroughStrategy.ApiKey— opaque API key; transport-specific header handling (consumers register their own strategy).
Logging discipline. value() returns the raw
token. It must never be:
- written to any logger,
- recorded in any
AuditEvent, - persisted to any store outside the
TokenCredentialStorecontract.
toString()
(e.g. "BearerToken{exp=…, aud=…, value=***}").
V00.74 ships this type tagged ExperimentalJSentinelApi;
stable-API promotion is staged for V00.76 after at least one demo
migration cycle.
- Since:
- 00.74.00
-
Method Summary
-
Method Details
-
value
String value()The raw token string.Never log, never audit, never persist outside the
TokenCredentialStore. Treated as a Class-A secret.- Returns:
- the raw token value (non-null, non-empty by construction)
-
expiresAt
-
audience
-
issuerHash
-