pub struct ExchangedToken {
pub access_token: String,
pub expires_in: i64,
pub token_type: TokenType,
pub nonce: Option<String>,
}Expand description
A successfully exchanged short-lived access token (#1314 / #1425).
token_type records whether the AS minted a sender-bound (DPoP,
RFC 9449) or bearer (Bearer) token. A DPoP token carries cnf.jkt
and must be presented as Authorization: DPoP with a fresh matching
proof on every resource request — the resource server rejects a
cnf.jkt-bound token presented as Bearer (RFC 9449 §7).
Debug is manual and redacts access_token so an accidental {:?} log
can’t leak the credential.
Fields§
§access_token: StringThe at+jwt access_token — presented as the client’s default JWT.
expires_in: i64Lifetime in seconds, as reported by the endpoint. Informational: Lane C
uses a static default-JWT; a refresh path (withTokenProvider) is the
future-work follow-on the recon notes.
token_type: TokenTypeThe OAuth token_type the AS returned — "DPoP" for a sender-bound
token (the #1425 browser contract), "Bearer" otherwise. Drives
whether downstream RPC requests must carry a DPoP proof.
nonce: Option<String>The server-issued DPoP-Nonce from a successful response (#1425 r1
P1#4). The caller persists this and supplies it on the next exchange
/ resource request to avoid a use_dpop_nonce round-trip. None when
the AS did not return a nonce (e.g. a non-DPoP response).
Trait Implementations§
Source§impl Clone for ExchangedToken
impl Clone for ExchangedToken
Source§fn clone(&self) -> ExchangedToken
fn clone(&self) -> ExchangedToken
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExchangedToken
impl Debug for ExchangedToken
Source§impl PartialEq for ExchangedToken
impl PartialEq for ExchangedToken
Source§fn eq(&self, other: &ExchangedToken) -> bool
fn eq(&self, other: &ExchangedToken) -> bool
self and other values to be equal, and is used by ==.impl Eq for ExchangedToken
impl StructuralPartialEq for ExchangedToken
Auto Trait Implementations§
impl Freeze for ExchangedToken
impl RefUnwindSafe for ExchangedToken
impl Send for ExchangedToken
impl Sync for ExchangedToken
impl Unpin for ExchangedToken
impl UnsafeUnpin for ExchangedToken
impl UnwindSafe for ExchangedToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more