android: add auth network core, token store, and DI wiring

This commit is contained in:
Codex
2026-03-08 22:21:24 +03:00
parent acdb83e04e
commit 0ff838baf7
19 changed files with 663 additions and 43 deletions

View File

@@ -7,3 +7,10 @@
- Added app dependencies for Retrofit/OkHttp, DataStore, coroutines, Hilt, and unit testing.
- Enabled INTERNET permission and registered MessengerApplication in manifest.
- Added MessengerApplication with HiltAndroidApp.
### Step 2 - Network/data core + DI
- Fixed DTO/Auth API serialization annotations and endpoint declarations for `/api/v1/auth/login`, `/api/v1/auth/refresh`, `/api/v1/auth/me`.
- Implemented DataStore-based token persistence with a corrected `getTokens()` read path.
- Added auth network stack: bearer interceptor, 401 authenticator with refresh flow and retry guard.
- Added clean-layer contracts and implementations: `domain/common`, `domain/auth`, `data/auth/repository`.
- Wired dependencies with Hilt modules for DataStore, OkHttp/Retrofit, and repository bindings.