OAuthSessionManager class final

Owns an OAuth session's lifecycle for API use: builds DPoP Authorization headers per request (nonce cached per origin) and refreshes the access token before it expires or on a 401. atproto_core delegates to this.

Constructors

OAuthSessionManager(OAuthClient? _client, {required String sub, DPoPSigner? signer, DPoPNonceCache? nonceCache})
OAuthSessionManager.fromSession(OAuthSession session, {OAuthClient? client, DPoPSigner? signer, DPoPNonceCache? nonceCache})
factory

Properties

currentPdsHost String?
no setter
currentSession OAuthSession?
no setter
currentSub String
no setter
hashCode int
The hash code for this object.
no setterinherited
onSessionUpdated Stream<OAuthSession>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildAuthHeaders(Uri endpoint, String method) Future<Map<String, String>>
getSession() Future<OAuthSession>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshOnUnauthorized() Future<bool>
reportDpopNonce(Uri endpoint, String nonce) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited