pub struct TokenMaterial {
pub access_token: String,
pub refresh_token: Option<String>,
pub expires_at: Option<DateTime<Utc>>,
pub client_secret: Option<String>,
}Expand description
The plaintext credential. This type exists to be sealed: it is
the input to the server’s envelope encryption and the output of
handle resolution, and it must never appear in a store row, a
journal, a manifest, or a log line. Debug is redacted by hand
(the receipt signing key’s posture); there is intentionally no
Display.
Serialize/Deserialize exist because sealing serializes — the
encrypted form is what the store holds. Any code serializing a
TokenMaterial for another purpose is the bug this type’s docs warn
against.
Fields§
§access_token: StringThe access token presented to the provider.
refresh_token: Option<String>The refresh token, where the provider issues one.
expires_at: Option<DateTime<Utc>>The access token’s expiry, when the provider declares one.
client_secret: Option<String>The client credential of an oauth2_client_credentials connection
(R0.11 wave 4): the long-lived secret the provider exchanges for
access tokens on every refresh. Sealed like everything else in
this struct; redacted in Debug; absent for every other flow.