Skip to content

Conversation

@eliasmeireles
Copy link
Contributor

No description provided.

Removed redundant auth and security logic, consolidating the user authentication flow. Replaced middleware with a streamlined handler-based approach, reducing dependencies and improving maintainability. Updated type definitions and imports to align with the new structure.
Updated variable names, comments, and log messages to ensure consistent terminology by replacing "user_service" with "user". Simplified API initialization by modifying handler definitions and added a new API secret service for better key management.
Upgraded "github.com/softwareplace/http-utils" to the latest version in go.mod and go.sum. Refactored user service to use security service and adjusted method calls to align with updated structures. Removed unused parameter in SetRoles method to clean up code.
Updated API security service contexts and request data handling for better type safety and coherence. Improved user role loading and key retrieval logic, ensuring accurate and consistent access controls. Adjusted MongoDB initialization order to optimize server startup sequence.
Replaced `httputilsserver.XApiKey` with `api_context.XApiKey` for consistency across modules. Adjusted expected HTTP status in `cmd/stream/main.go` to `http.StatusOK`. Cleaned up redundant module entries in `go.mod` and `go.sum`.
Upgraded Golang image to 1.23 and adjusted environment variables for better flexibility, including support for `DEBUG_MODE`. Enhanced logging functionality and streamlined Docker and MongoDB initialization processes. Minor fixes in file paths and documentation updates were also made.
Replaced deprecated user login and access handler logic with a new modular `loginServiceImpl` and `UserPrincipalService`. Streamlined repository access, removed redundant methods, and migrated key functionalities to services for better maintainability and scalability. Updated API router initialization and cleaned up user request context.
Updated the `LoadPrincipal` method to use `AccessId` instead of `Salt` for user lookups. This ensures accurate mapping of user credentials and resolves potential mismatches during authentication.
Refactored various services and repositories to use singletons for consistent initialization and to ensure thread safety. Updated dependencies, adjusted initialization flows, and revised method calls to align with the new singleton approach.
@eliasmeireles eliasmeireles merged commit 7958a1b into main Jan 20, 2025
1 check passed
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