openapi: 3.2.0 info: description: 'The Outdoorsy API (or simply "API") is organized around REST. It uses predictable, resource-oriented URLs and implements standard HTTP response codes, verbs, authentication mechanisms, and a variety of request encodings. ## Versioning The API implements semantic versioning.' title: Outdoorsy API Documentation Two Factor Auth API version: 0.0.1 servers: - url: /v0 security: - Bearer: - '[]' - API-Key: - '[]' tags: - name: Two Factor Auth paths: /2fa/send: post: description: Create and send verification code tags: - Two Factor Auth operationId: sendCode responses: '201': $ref: '#/components/responses/successResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorizedError' requestBody: content: application/json: schema: $ref: '#/components/schemas/TwoFARequest' summary: Send code x-summary-source: derived /2fa/setup-method: post: tags: - Two Factor Auth operationId: setupPreferredMethod responses: '201': $ref: '#/components/responses/successResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorizedError' requestBody: content: application/json: schema: $ref: '#/components/schemas/TwoFASetupMethod' summary: Setup preferred method x-summary-source: derived /2fa/verify: patch: tags: - Two Factor Auth operationId: verifyCode responses: '200': $ref: '#/components/responses/successResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorizedError' requestBody: content: application/json: schema: $ref: '#/components/schemas/VerifyCodeRequest' summary: Verify code x-summary-source: derived components: responses: badRequestError: description: Invalid input or state means you're bad headers: Error: schema: type: string successResponse: description: '' unauthorizedError: description: Unauthorized error schemas: TwoFASetupMethod: type: object properties: preferred_2fa_method: type: string x-go-name: Preferred2FAMethod session_id_2fa: type: string x-go-name: SessionID x-go-package: github.com/outdoorsy/api/internal/two_factor_authentication TwoFARequest: type: object properties: session_id_2fa: type: string x-go-name: SessionID type: type: string x-go-name: Type x-go-package: github.com/outdoorsy/api/internal/two_factor_authentication VerifyCodeRequest: type: object properties: biometric_id: type: string x-go-name: BiometricID code: type: string x-go-name: Code session_id_2fa: type: string x-go-name: SessionID x-go-package: github.com/outdoorsy/api/internal/two_factor_authentication securitySchemes: API-Key: type: apiKey name: API-Key in: header Bearer: type: apiKey name: Authorization in: header