vexana
vexana copied to clipboard
Add Optional Refresh Token Handling to `NetworkManager`
Description
This issue proposes the introduction of optional refresh token handling in the NetworkManager class.
Problem
Currently, all requests made through NetworkManager implicitly rely on refresh token handling, which can lead to unnecessary overhead for public or unauthenticated endpoints.
Proposed Solution
Add a new optional parameter disableRefreshToken to the send and sendRequest methods. This will allow developers to explicitly disable token refresh logic for individual requests.
Acceptance Criteria
- [x] A
disableRefreshTokenboolean parameter is added to thesendandsendRequestmethods. - [x] If
disableRefreshTokenistrue, token refresh logic is skipped for that request. - [x] If not provided, the behavior remains backward compatible (defaults to current behavior).
- [x] Documentation is updated with usage examples.
Benefits
- Greater control over authentication flows.
- Improved performance by avoiding unnecessary token refresh operations for specific requests.
- Cleaner codebase with per-request flexibility.