mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-01-26 00:51:44 +00:00
Complete implementation planning for CLI app with MFA
- Created implementation plan with technical context - Developed data models for User Session, Sync Job, and Authentication Token - Defined API contracts for authentication, sync triggering, and status checking - Created quickstart guide for CLI usage - Updated agent context with new technology stack - Verified constitution compliance for all design decisions
This commit is contained in:
112
specs/006-cli-auth-sync-mfa/contracts/auth_cli_login.yaml
Normal file
112
specs/006-cli-auth-sync-mfa/contracts/auth_cli_login.yaml
Normal file
@@ -0,0 +1,112 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: GarminSync CLI Authentication API
|
||||
version: 1.0.0
|
||||
description: API for CLI-based authentication with MFA support
|
||||
paths:
|
||||
/api/auth/cli/login:
|
||||
post:
|
||||
summary: Authenticate user via CLI with optional MFA
|
||||
description: Authenticates a user with username/password and optional MFA code
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- username
|
||||
- password
|
||||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: User's email or username
|
||||
password:
|
||||
type: string
|
||||
description: User's password
|
||||
mfa_code:
|
||||
type: string
|
||||
description: MFA code if required
|
||||
remember_me:
|
||||
type: boolean
|
||||
description: Whether to store tokens for future use
|
||||
responses:
|
||||
'200':
|
||||
description: Authentication successful
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: true
|
||||
session_id:
|
||||
type: string
|
||||
description: Unique session identifier
|
||||
access_token:
|
||||
type: string
|
||||
description: Access token for API calls
|
||||
token_type:
|
||||
type: string
|
||||
description: Type of token (e.g., Bearer)
|
||||
expires_in:
|
||||
type: integer
|
||||
description: Time until token expiration in seconds
|
||||
mfa_required:
|
||||
type: boolean
|
||||
description: Whether MFA is required for this account
|
||||
user:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: User identifier
|
||||
email:
|
||||
type: string
|
||||
description: User's email
|
||||
username:
|
||||
type: string
|
||||
description: User's username
|
||||
'400':
|
||||
description: Invalid credentials or missing required fields
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
mfa_required:
|
||||
type: boolean
|
||||
description: Whether MFA is required for this account
|
||||
'401':
|
||||
description: Authentication failed
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
'429':
|
||||
description: Too many failed attempts
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
example: false
|
||||
error:
|
||||
type: string
|
||||
description: Error message
|
||||
Reference in New Issue
Block a user