info:
  description: API for managing counterparty risk and intelligence
  title: PostRFP Auth API
  version: 1.8.1
servers:
- url: https://re.postrfp.com/auth/api/
- url: http://localhost:9000/auth/api/
paths:
  /login:
    post:
      description: Authenticate user, handle lockout, return access token in 
        body, refresh token as cookie.
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_login
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Login'
  /logout:
    post:
      description: Logout by revoking the refresh token and clearing the 
        associated http cookie.
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_logout
  /password/emailkey:
    post:
      description: "Trigger a password reset email to be sent to the user with the
        provided user_id.\n\nThe generated email will provide a URL link containing
        a short-lived JWT\nfor the user to reset their password."
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_password_emailkey
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDoc'
  /password/update:
    post:
      description: Reset the user's password using a JWT key value provided via 
        email.
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_password_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResetDoc'
  /refresh/token:
    post:
      description: Exchange a valid refresh token cookie for a new access token.
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: post_refresh_token
openapi: 3.1.1
components:
  schemas:
    Login:
      properties:
        user_id:
          maxLength: 50
          title: User Id
          type: string
        password:
          maxLength: 256
          title: Password
          type: string
      required:
      - user_id
      - password
      title: Login
      type: object
    ResetDoc:
      properties:
        user_id:
          maxLength: 50
          title: User Id
          type: string
        new_password:
          maxLength: 256
          title: New Password
          type: string
        key:
          maxLength: 256
          title: Key
          type: string
      required:
      - user_id
      - new_password
      - key
      title: ResetDoc
      type: object
    UserDoc:
      properties:
        user_id:
          maxLength: 50
          title: User Id
          type: string
      required:
      - user_id
      title: UserDoc
      type: object
