AuthService class

HTTP API service for authentication endpoints.

Provides direct Dio calls for login, logout, and password management. This is a low-level service — callers should use AuthRepository rather than depending on this class directly.

Two Dio clients are required: publicDio for unauthenticated endpoints and authenticatedDio for endpoints that require a valid session.

Constructors

AuthService({required Dio publicDio, required Dio authenticatedDio})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

forgotPassword({required String email}) Future<Response>
Sends a password-reset link request to POST /api/password/sendResetLink.
getDummyLogin() Future<Response>
Returns a stub login response for development, without hitting the network.
getDummyLogout() Future<Response>
Returns a stub logout response for development, without hitting the network.
login({required String email, required String password}) Future<Response>
Sends a login request to POST /api/login.
logout() Future<Response>
Sends a logout request to POST /api/logout.
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