Skip to content

refactor: consolidate authentication, provider, tenant, and user modules into identity module#175

Merged
danielhe4rt merged 2 commits into4.xfrom
feat/identity-module
Mar 16, 2026
Merged

refactor: consolidate authentication, provider, tenant, and user modules into identity module#175
danielhe4rt merged 2 commits into4.xfrom
feat/identity-module

Conversation

@danielhe4rt
Copy link
Contributor

Summary

  • Consolidates authentication, provider, tenant, and user modules into a single identity module for better cohesion and maintainability
  • Removes the shared module and moves contracts (OAuthClientContract, Paginator) to the app directory
  • Updates all references across the codebase to use the new module structure

Changes

Identity Module Structure

  • Auth: Authentication actions, DTOs, and HTTP controllers
  • ExternalIdentity: Provider/OAuth management (formerly provider module)
  • Tenant: Tenant models and concerns
  • User: User models, actions, DTOs, and HTTP controllers

Removed Modules

  • app-modules/authentication
  • app-modules/provider
  • app-modules/tenant
  • app-modules/user
  • app-modules/shared

Moved to App Directory

  • OAuthClientContractapp/Contracts/OAuthClientContract.php
  • Paginator contract → app/Contracts/Paginator.php
  • Paginator support class → app/Support/Paginator.php

- Move Paginator contract and implementation from He4rt\Shared to App\Contracts and App\Support
- Move OAuthClientContract from He4rt\Authentication to App\Contracts
- Replace TTL helper class with inline calculations (e.g., 2 * 3600 for hours)
- Remove unused UserId value object
- Update all module imports to use new App namespace
- Register Paginator binding in AppServiceProvider
- Update composer.json to remove he4rt/shared dependency
…les into identity module

- Create unified identity module with organized subdomains:
  - Auth: OAuth authentication flow and DTOs
  - ExternalIdentity: Provider/external identity management (renamed from Provider)
  - Tenant: Multi-tenancy support
  - User: User models, actions, and profile management

- Rename key classes for clarity:
  - Provider -> ExternalIdentity
  - Token -> AccessToken
  - ProviderEnum -> IdentityProvider
  - ProviderException -> ExternalIdentityException

- Update all module imports across the codebase:
  - badge, bot-discord, character, events, feedback, integrations
  - meeting, message, ranking, season, sponsors

- Move OAuthClientContract and Paginator to App\Contracts
- Remove deprecated modules: authentication, provider, tenant, user
- Update composer.json dependencies
Copy link
Member

@gvieira18 gvieira18 left a comment

Choose a reason for hiding this comment

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

In God I trust.

@danielhe4rt danielhe4rt merged commit f9ea138 into 4.x Mar 16, 2026
6 checks passed
@danielhe4rt danielhe4rt deleted the feat/identity-module branch March 16, 2026 23:36
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.

2 participants