-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor authentication and user modules to typescript #237
Draft
restjohn
wants to merge
183
commits into
develop
Choose a base branch
from
beaucoup-users
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…ongoose repository
…ated api routes, which does not seem to be used by any client or anywhere else in the service
…and add repository
…pository and use the mongoose doctype parameter as intended to represent raw db documents instead of a hydrated mongoose document-model instance
…goose repository entity mapping
…proper mongoose type patterns
…oper mongoose type patterns
…script and new auth scheme
…nal/domain services for reuse
…related legacy event and user types
… internal services to allow dependency injection and reuse
…ol binding factory functions
…entity mapping and some interface methods; remove authentication id foreign key and unused icon type property from schema
…ex to ingress main module
…dleware; mage does not require a session cookie
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.
This PR is a work in progress for refactoring all modules and code related to authentication and user management to strongly-typed TypeScript modules adhering to clean architecture patterns using dependency injection. There are many comments in code tagged with
TODO: users-next: ...
with notes on changes yet to be made.A large portion of this PR centers around refactoring Mage's authentication mechanisms for clarity and eliminating redundancy of enrollment logic between different authentication protocols. All authentication-related modules now reside in the
service/src/ingress
directory.This branch does not yet build. Once all necessary changes are complete, tests will need corresponding updates. Developers should implement integration tests with dependency injection mocks to exercise the full authentication path.
Once refactoring and testing are complete, implement a plugin that creates a large user set on the order of 100,000 users for scalability testing. The plugin should accept core user services available through dependency injection in order to enroll users for testing.
The merge for this branch should be relatively easy, despite many renamed modules and changes. This work has been isolated to authentication and user management operations which are secondary use cases relative to core business logic goals of Mage and should not have much, if any, conflict with any other recent development work. Nevertheless, this effort represents a large and necessary resolution of technical debt contributing to stability, testability, and developer experience.