Skip to content

refactor: align token configuration endpoints with application architecture - #75

Open
9ajia wants to merge 2 commits into
developmentfrom
tokenrequest
Open

9ajia wants to merge 2 commits into
developmentfrom
tokenrequest

Conversation

@9ajia

@9ajia 9ajia commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Refactors the token configuration endpoints to follow the existing entity, domain, use-case and response architecture.

Changes

  • Moves the configuration endpoints into a dedicated TokenConfigurationController.
  • Moves their database operations into a dedicated TokenConfigurationGateway.
  • Adds domain models for token options, APIs and endpoints.
  • Adds factories to convert between request, domain, database and response models.
  • Keeps the existing routes, validation rules, status codes and response formats unchanged.
  • Leaves the existing token creation, listing and update endpoints unchanged.
  • Adds integration coverage for successful API creation.

Endpoints covered

  • GET /api/v1/tokens/options
  • POST /api/v1/tokens/apis
  • POST /api/v1/tokens/apis/{apiLookupId}/endpoints

Why

These endpoints previously passed boundary request and response models through the use-case and gateway layers. The refactor separates the HTTP models from the domain and database layers, following the architecture used across the application.

Testing

  • All 13 configuration endpoint integration tests pass against Docker PostgreSQL.
  • The other 103 tests pass when excluding the existing JWT expiry-date test.
  • The JWT expiry test currently has an unrelated local UTC/date mismatch; no JWT code was changed.

Checklist

  • Public routes remain unchanged.
  • Response formats remain unchanged.
  • Existing validation remains in place.
  • No database migrations or schema changes.
  • Existing token operations were not refactored.
  • Configuration endpoints tested against PostgreSQL.

@9ajia
9ajia requested review from a team as code owners September 15, 2026 07:52
@9ajia 9ajia self-assigned this Sep 15, 2026
that-Gui
that-Gui previously approved these changes Sep 15, 2026

@that-Gui that-Gui left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀LGTM

Comment thread TokenAdministrationApi/V1/Controllers/TokenConfigurationController.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants