Skip to content

Conversation

@ben-shepherd
Copy link
Collaborator

todo

… domain, currently in a broken state

- Migrate authentication interfaces and services to new domain structure
- Create separate legacy and new authentication domains
- Update import paths and references across the project
- Introduce new authentication interfaces and base classes
- Enhance authentication configuration and service management
…ices

- Introduce ACLService for managing role-based access control
- Create ScopeMatcher utility for handling scope permissions
- Update JwtAuthService to use new ACL and scope services
- Enhance authentication interfaces with more granular permission handling
- Remove legacy authentication domain files
- Update providers and configuration to support new authentication structure
…user management

- Add AuthorizeMiddleware for comprehensive request authentication and authorization
- Update ApiToken and AuthUser models with improved scope and user retrieval methods
- Refactor UserRepository with new methods for user lookup
- Update ACLService to support group scope retrieval
- Modify AuthService to expose JWT and user repository adapters
- Improve authentication configuration and interfaces
- Migrate User model to extend AuthUser instead of Model
- Remove redundant role, group, and email methods from User
- Update UserRepository to use AuthUserRepository base class
- Simplify AuthProvider initialization and service binding
- Remove legacy imports and unnecessary code
…tterns

- Implement RegisterUseCase for handling user registration logic
- Move UserObserver and ApiTokenObserver to core/domains/auth
- Update AuthController to use RegisterUseCase for authentication actions
- Modify JwtAuthService to include getUserRepository method
- Enhance ACLService with getDefaultGroup method
- Update Model and ApiResponse with additional utility methods
- Reorganize import paths and improve code structure
…vements

- Add LoginUseCase for handling user authentication with detailed error handling
- Create UserUseCase for retrieving authenticated user profile
- Enhance AuthController with centralized error handling and use case delegation
- Update IJwtAuthService to make scopes optional
- Modify RouterBindService to support route middlewares
- Improve error response handling and authentication flow
- Modify Router class to correctly apply middlewares from route options
- Ensure middleware merging uses the provided options instead of route's base options
- Improve middleware configuration flexibility in route handling
- Add LogoutUseCase to handle token revocation
- Create RefreshUseCase for generating new JWT tokens
- Update AuthController to use new use cases for logout and refresh endpoints
- Modify JwtAuthService to support token refresh and revocation
- Update router configuration for authentication routes
- Improve error handling and token management in authentication flow
- Implement UpdateUseCase for handling user profile updates
- Update AuthController with new update method
- Modify User and AuthUser models to remove JSON serialization for groups and roles
- Update migration to use string arrays for groups and roles
- Add PATCH /update route to authentication router
- Add configurable route options to JwtAuthService for more flexible authentication
- Implement optional registration route and auth route enabling
- Add detailed documentation to authentication use cases
- Improve code clarity and configuration flexibility in auth domain
- Add detailed module-level documentation explaining auth configuration
- Provide usage examples for retrieving auth services and adapters
- Clarify how authentication services can be accessed in the application
…ting auth utilities

- Remove entire auth-legacy directory and migrate remaining utilities to core/domains/auth
- Update import paths across multiple files to use new auth domain location
- Add GenerateJwtSecret command for JWT secret management
- Consolidate authentication exceptions and utility functions
- Clean up and reorganize authentication-related code structure
- Update JwtAuthService to support optional API token and user models
- Modify IJwtConfig to allow optional model configurations
- Add createJwtFromUser method to IJwtAuthService
- Update repositories to handle optional model constructors
- Refactor test configurations to use new authentication setup
- Improve type safety and flexibility in authentication domain
- Replace hardcoded LarascriptProviders with dynamic providers import
- Modify Kernel boot configuration to use providers from config/providers
- Simplify provider loading in Tinker entry point
… method descriptions

- Add detailed class-level documentation explaining UserRepository's purpose and features
- Enhance method documentation with clear descriptions and parameter explanations
- Improve code readability and maintainability
- Remove ApiTokenRepository as part of ongoing auth domain consolidation
- Update BaseRequest to use local imports for auth-related interfaces
- Enhance documentation for TBaseRequest type
- Create new IRequestIdentifiable interface with id property
- Remove TestApiTokenFactory as part of ongoing auth domain cleanup
@ben-shepherd ben-shepherd merged commit 2225877 into develop Feb 5, 2025
@ben-shepherd ben-shepherd deleted the auth-refactor branch June 3, 2025 15:31
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