Secure Session Storage
API Contract
REST
/api/v1/session-storage
8 endpoints
GET
/api/v1/session-storage/api/v1/session-storage
Public
Response Example
{
"data": [
{
"id": "store_001",
"user_id": "usr_9a2f31",
"token_preview": "eyJhbGci...Q3Yk",
"expires_at": "2026-03-26T11:00:00Z",
"is_valid": true,
"saved_at": "2026-03-26T08:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
GET
/api/v1/session-storage/api/v1/session-storage/:id
Public
Response Example
{
"id": "store_001",
"user_id": "usr_9a2f31",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2026-03-26T11:00:00Z",
"is_valid": true,
"saved_at": "2026-03-26T08:00:00Z"
}
GET
/api/v1/session-storage/api/v1/session-storage/current
Public
Response Example
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2026-03-26T11:00:00Z",
"is_valid": true
}
GET
/api/v1/session-storage/api/v1/session-storage/validity
Public
Response Example
{
"is_valid": true,
"expires_at": "2026-03-26T11:00:00Z",
"seconds_remaining": 3540
}
POST
/api/v1/session-storage/api/v1/session-storage
Public
Request Example
{
"user_id": "usr_9a2f31",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_at": "2026-03-26T11:00:00Z"
}
Response Example
{
"id": "store_002",
"user_id": "usr_9a2f31",
"token_preview": "eyJhbGci...Q3Yk",
"expires_at": "2026-03-26T11:00:00Z",
"is_valid": true,
"saved_at": "2026-03-26T09:20:00Z",
"created_at": "2026-03-26T09:20:00Z"
}
PUT
/api/v1/session-storage/api/v1/session-storage/:id
Public
Request Example
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.refreshed...",
"expires_at": "2026-03-26T13:00:00Z"
}
Response Example
{
"id": "store_001",
"user_id": "usr_9a2f31",
"token_preview": "eyJhbGci...Zm2w",
"expires_at": "2026-03-26T13:00:00Z",
"is_valid": true,
"saved_at": "2026-03-26T09:20:01Z"
}
DELETE
/api/v1/session-storage/api/v1/session-storage
Public
Response Example
{
"cleared": true,
"message": "All session tokens cleared from secure storage"
}
DELETE
/api/v1/session-storage/api/v1/session-storage/:id
Public
Response Example
{
"deleted": true,
"id": "store_001"
}