ApiAuth class
Connection-scoped transport authentication and manual override state.
Constructors
- ApiAuth({required AuthStrategy strategy, required AuthStrategyContext context, ApiLogger logger = const DeveloperApiLogger(), ApiLoggingConfig logging = const ApiLoggingConfig()})
Properties
-
changes
→ Stream<
AuthSession> -
no setter
- current → AuthSession
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sessionHeaders
→ Map<
String, String> -
no setter
Methods
-
apply(
RequestOptions options) → Future< void> -
clear(
{String reason = 'logout'}) → Future< void> -
completeAuthentication(
{String? credential}) → Future< void> - Compatibility helper for callers that do not yet use session IDs.
-
dispose(
) → Future< void> -
expire(
{String reason = 'unauthorized'}) → Future< void> - Expires the current session once, even when many requests return 401 concurrently. Refresh orchestration remains generated/application owned.
-
initialize(
) → Future< AuthSession> -
initializeUserSession(
{required String sessionId, String? bearerToken, Map< String, String> ? authHeaders}) → Future<void> - Starts or updates a transport user session after application login.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited