Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.