Task #1745
openEpic #1602: Auth API Integration
User Story #1618: Security API Integration
Implement Security API Integration for CSRF Token Retrieval
0%
Description
Integrate the CSRF token endpoint to fetch a CSRF token using the generated JWT token. This token will be used to secure protected actions and prevent CSRF attacks.
API Details:
Endpoint: GET /security/csrf-token
Required Headers:
Authorization: Bearer {{auth_token}}
x-username
Content-Type: application/json
x-app-payload
x-app-signature
locale
x-app-version
x-platform
Expected Response:
csrfToken
expiresAt
expiresInMinutes
Scope of Work:
Create API client method for CSRF token retrieval
Pass JWT token in Authorization header
Pass username in x-username header
Parse csrf token and expiry details from response
Store CSRF token for secure request usage
Handle token expiration logic
Add proper error handling and debug logs
Acceptance Criteria:
CSRF token API is integrated successfully
JWT token is sent correctly in Authorization header
CSRF token is parsed and stored correctly
Expiry details are handled properly
Error scenarios are managed gracefully
Updated by Muhammad Fahad about 12 hours ago
- Status changed from New to In Progress