Skip to content

SI-3: Migrate auth_key context to contract-first architecture #1941

Closed

Description

@josecelano

Subissue of EPIC #1938 — REST API Contract-First Migration

Problem

The auth_key context has 4 handlers and 7 response functions defined locally in axum-rest-api-server. It calls tracker_core::authentication::{Key, AddKeyRequest, KeysHandler} directly. Local DTOs (AuthKey, AddKeyForm, KeyParam) should live in rest-api-protocol.

Scope

  • Move AuthKey, AddKeyForm, KeyParam DTOs to rest-api-protocol/src/v1/resources/auth_key.rs
  • Define AuthKeyCommandPort trait in rest-api-application/src/ports/
  • Implement AuthKeyApiService use-case
  • Implement TrackerAuthKeyAdapter in rest-api-runtime-adapter wrapping KeysHandler + clock
  • Rewire Axum handlers to use AuthKeyApiService

Checklist

  • Protocol DTOs created and exported
  • AuthKeyCommandPort trait defined
  • AuthKeyApiService use-case implemented
  • TrackerAuthKeyAdapter implemented
  • Axum handlers dispatch through use-case
  • Pre-commit checks pass
  • Pre-push checks pass

Activity

  1. self-assigned this
    on Jun 24, 2026
  2. added
    Code Cleanup / Refactoring
    - Developer -
    API
    on Jun 24, 2026
  3. added 2 commits that reference this issue on Jun 24, 2026
  4. added a commit that references this issue on Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

- Developer -APICode Cleanup / Refactoringtask

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions