Overview
The authentication models handle login, token refresh, and session management for different platforms (web and mobile).Payload Models
LoginPayload
Payload for login requests. Requires eitheremail or phoneNumber, along with password.
Source: src/app/core/models/auth/auth.payload.ts:8
User’s email address. Either
email or phoneNumber is required.User’s phone number. Either
email or phoneNumber is required.User’s password for authentication.
Geographic location of the user at login time.
Identifies which application is making the request.Possible values:
driver_app | passenger_app | admin_panel | api_clientThe expected user type for this login attempt.Enum values:
passenger | driver | adminResponse Models
BaseAuthResponse
Common fields returned by the backend in login/refresh responses. Source:src/app/core/models/auth/auth.response.ts:4
JWT access token for authenticating API requests.
Expiration timestamp for the access token in epoch milliseconds.
Expiration timestamp for the refresh token in epoch milliseconds. Present in login/refresh responses.
Session ID (JTI). Primarily present in refresh responses.
Type of session being created.Enum values:
web | mobile_app | admin_panel | api_clientLoginResponse
Unified response type for login requests. Returns different formats for mobile and web platforms. Source:src/app/core/models/auth/auth.response.ts:24
LoginResponseMobile
Login response for mobile applications. Includes refresh token in the response body. Source:src/app/core/models/auth/auth.response.ts:13
JWT refresh token for obtaining new access tokens. Included in response body for mobile apps.
All properties from BaseAuthResponse are included.
LoginResponseWeb
Login response for web applications. Refresh token is sent via HTTP-only cookie, not in response body. Source:src/app/core/models/auth/auth.response.ts:18
Explicitly absent from response body. Refresh token is set as HTTP-only cookie for web clients.
All properties from BaseAuthResponse are included.
RefreshResponse
Unified response type for token refresh requests. Returns different formats for mobile and web platforms. Source:src/app/core/models/auth/auth.response.ts:35
RefreshResponseMobile
Refresh response for mobile applications. Includes new refresh token in the response body. Source:src/app/core/models/auth/auth.response.ts:27
New JWT refresh token. Mobile apps receive the refresh token in the response body.
All properties from BaseAuthResponse are included.
RefreshResponseWeb
Refresh response for web applications. New refresh token is sent via HTTP-only cookie. Source:src/app/core/models/auth/auth.response.ts:31
Explicitly absent from response body. New refresh token is set as HTTP-only cookie.
All properties from BaseAuthResponse are included.
Auxiliary Types
SessionType
Enumeration of available session types for authentication. Source:src/app/core/models/auth/auth.auxiliary.ts:4
Web browser session. Value:
'web'Mobile application session. Value:
'mobile_app'Admin panel session. Value:
'admin_panel'API client session. Value:
'api_client'DeviceInfo
Information about the device initiating the login. Source:src/app/core/models/auth/auth.auxiliary.ts:14
Operating system name and version (e.g., “iOS 16.5”, “Android 13”).
Browser name and version (e.g., “Chrome 120”, “Safari 17”).
Device model (e.g., “iPhone 14 Pro”, “Samsung Galaxy S23”).
Application version number (e.g., “2.3.1”).
Location
Geographic location information. Source:src/app/core/models/auth/auth.auxiliary.ts:24
Geographic latitude coordinate.
Geographic longitude coordinate.
City name.
Country name.
AppAudience
Type alias identifying which application is making the request. Source:src/app/core/models/auth/auth.payload.ts:3
Request from the driver mobile application.
Request from the passenger mobile application.
Request from the administrative web panel.
Request from an external API client.