> ## Documentation Index
> Fetch the complete documentation index at: https://resq-dependabot-github-actions-github-actions-478e18be3d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Login handler for basic authentication.

> In production, this would validate against a user database.
For now, it accepts a hardcoded admin user for testing.



## OpenAPI

````yaml /specs/infrastructure.json post /login
openapi: 3.1.0
info:
  title: resq-api
  description: ''
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  version: 0.1.0
servers: []
security: []
tags:
  - name: resq-backend
    description: ResQ Infrastructure API
  - name: auth
    description: Authentication endpoints
  - name: incidents
    description: Incident management endpoints
  - name: evidence
    description: Evidence management endpoints
  - name: blockchain
    description: Blockchain query endpoints
  - name: solana
    description: Solana program endpoints (PoD + airspace)
paths:
  /login:
    post:
      tags:
        - auth
      summary: Login handler for basic authentication.
      description: |-
        In production, this would validate against a user database.
        For now, it accepts a hardcoded admin user for testing.
      operationId: login_handler
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: Login successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '401':
          description: Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthError'
components:
  schemas:
    LoginRequest:
      type: object
      description: Login request payload.
      required:
        - username
        - password
      properties:
        password:
          type: string
          description: Password for authentication
        username:
          type: string
          description: Username for authentication
    LoginResponse:
      type: object
      description: Login response with JWT token.
      required:
        - token
        - expires_at
      properties:
        expires_at:
          type: integer
          description: Token expiration time (Unix timestamp)
          minimum: 0
        token:
          type: string
          description: JWT token for authenticated requests
    AuthError:
      type: object
      description: Authentication error response.
      required:
        - error
      properties:
        error:
          type: string
          description: Error description

````