Project

General

Profile

Actions

Task #1745

open

Epic #1602: Auth API Integration

User Story #1618: Security API Integration

Implement Security API Integration for CSRF Token Retrieval

Added by Muhammad Fahad about 12 hours ago. Updated about 12 hours ago.

Status:
In Progress
Priority:
Normal
Target version:
-
Start date:
04/15/2026
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Muhammad Fahad about 12 hours ago

  • Status changed from New to In Progress
Actions

Also available in: Atom PDF