Outdoorsy Two Factor Auth API

The twoFactorAuth API from Outdoorsy — 3 operation(s) for twofactorauth.

OpenAPI Specification

outdoorsy-twofactorauth-api-openapi.yml Raw ↑
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: twoFactorAuth
paths:
  /2fa/send:
    post:
      description: Create and send verification code
      tags:
      - twoFactorAuth
      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'
  /2fa/setup-method:
    post:
      description: Setup preferred method
      tags:
      - twoFactorAuth
      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'
  /2fa/verify:
    patch:
      description: Verify code
      tags:
      - twoFactorAuth
      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'
components:
  responses:
    successResponse:
      description: ''
    badRequestError:
      description: Invalid input or state means you're bad
      headers:
        Error:
          schema:
            type: string
    unauthorizedError:
      description: Unauthorized error
  schemas:
    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
    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
  securitySchemes:
    API-Key:
      type: apiKey
      name: API-Key
      in: header
    Bearer:
      type: apiKey
      name: Authorization
      in: header