pub struct AtrgSession {
pub did: String,
pub handle: String,
pub access_token: String,
pub refresh_token: Option<String>,
pub expires_at: i64,
pub source: AuthSource,
}Expand description
A resolved authentication session, shared across all auth paths.
Handlers receive this via AuthUser or RequireAuth extractors.
The source field indicates whether the credential was an atrg
session token or an AT Protocol JWT — but most handlers shouldn’t
need to check.
Fields§
§did: StringThe user’s DID (e.g. did:plc:...).
handle: StringThe user’s handle (e.g. alice.bsky.social).
access_token: StringThe access token for outbound AT Protocol calls.
refresh_token: Option<String>The refresh token (only present for atrg sessions).
expires_at: i64Unix timestamp when this session expires.
source: AuthSourceHow the user authenticated.
Trait Implementations§
Source§impl Clone for AtrgSession
impl Clone for AtrgSession
Source§fn clone(&self) -> AtrgSession
fn clone(&self) -> AtrgSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AtrgSession
impl RefUnwindSafe for AtrgSession
impl Send for AtrgSession
impl Sync for AtrgSession
impl Unpin for AtrgSession
impl UnsafeUnpin for AtrgSession
impl UnwindSafe for AtrgSession
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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