mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-25 16:41:41 +00:00
Adds the technical plan, data model, API contracts, and research for the persisted Garmin authentication feature.
112 lines
3.2 KiB
JSON
112 lines
3.2 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Garmin Sync Authentication API",
|
|
"version": "1.0.0",
|
|
"description": "API for managing Garmin Connect authentication and session persistence."
|
|
},
|
|
"paths": {
|
|
"/api/v1/garmin/session/login": {
|
|
"post": {
|
|
"summary": "Initiate Garmin Connect Login",
|
|
"operationId": "login_garmin_session_login_post",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": { "type": "string" },
|
|
"password": { "type": "string", "format": "password" }
|
|
},
|
|
"required": ["username", "password"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Login successful or MFA required",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": { "type": "string", "enum": ["SUCCESS", "MFA_REQUIRED"] },
|
|
"message": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Invalid credentials"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/garmin/session/mfa": {
|
|
"post": {
|
|
"summary": "Submit MFA Code",
|
|
"operationId": "mfa_garmin_session_mfa_post",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"mfa_code": { "type": "string" }
|
|
},
|
|
"required": ["mfa_code"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "MFA submission successful, session persisted",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": { "type": "string", "example": "SUCCESS" },
|
|
"message": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid MFA code or no pending login"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/garmin/session/status": {
|
|
"get": {
|
|
"summary": "Get Garmin Session Status",
|
|
"operationId": "status_garmin_session_status_get",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Current status of the persisted session",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": { "type": "string", "enum": ["VALID", "MISSING", "EXPIRED", "MFA_PENDING"] },
|
|
"last_validated": { "type": "string", "format": "date-time" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|