Conversation
Owner
Author
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.
This pull request introduces a major refactor and expansion of the authentication and registration modules, moving from a simple user registration approach to a more robust, role-based registration system that supports both client and specialist user profiles. It replaces the previous registration use case and DTOs with new ones that handle richer domain models, and introduces new domain classes for
ClientProfileandSpecialistProfile. The authentication response is also improved to return structured token metadata.Key changes include:
Registration & User Domain Refactor:
RegisterUserUseCaseand related DTOs (CreateUserRequest,CreateUserResponse) withRegistrationUseCase,RegistrationRequest, andRegistrationResponse, enabling registration of both client and specialist users with extended profile information and validation. ([[1]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-31f9056ac2313e70d2cf5a9615fa4deca1e613e94f67403438eb6a9f2d2e23e5R1-R74),[[2]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-8d66de3c850dd44e4a1b54e36fba354611e88a5b02fb2809ba2412a2a790fb4bR1-R44),[[3]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-8cf99a38480341a1539ce5a59faa102e04b291a1466b89f614748ab38526c3b3L5-R6),[[4]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-de8e2df0ad18fb945674a5473619eb87288ce295a7197dfc6517c7fcebf455aaL1-L24),[[5]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-867dbabcde82304ac769d46bab3f50ab1cdec7ff0256d0b42d1e23d217bcf33bL1-L35))Userdomain model to include anAddressand updated creation/restore methods to use the builder pattern and support the new fields. ([[1]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-96b349826caf8893608c3e489b697c5a6b416f9e257bd1c776fae1b55ef7fc13R5-R15),[[2]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-96b349826caf8893608c3e489b697c5a6b416f9e257bd1c776fae1b55ef7fc13R24-L38))Domain Model Additions:
ClientProfileandSpecialistProfile, encapsulating profile-specific data for clients and specialists, and providing static creation/restore methods. ([[1]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-cd0337ab9664c74d14fa11bf76857447ed93a0fbe49a42e4bb33a18cc8207020R1-R43),[[2]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-f91fddcec79faab238da67e9fd1bc5f3c14aff541cedc9e0c95b30babfa5a6b1R1-R53))RelationshipDegreeto represent the relationship degree for emergency contacts. ([src/main/java/com/soupulsar/modulith/auth/domain/model/enums/RelationshipDegree.javaR1-R21](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-f3fc439f5944fe164555693dd1759e6e9a6a0ec0e892f972ed1994c58b55e190R1-R21))Authentication Improvements:
AuthUserResponsecontaining access token, token type, subject, issued at, and expiration information, rather than just a token string. ([[1]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-fc5293661853ce60162cc8b45cc4c6e1422eabb7c2c9120d2dfc567af0936310R4-R22),[[2]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-fc5293661853ce60162cc8b45cc4c6e1422eabb7c2c9120d2dfc567af0936310L31-R46),[[3]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-b4807c2e9254d8f6474252d083bf11ac5b5fa4d0a13720e3d62cac0f96886ce2R1-R13))Controller and Configuration Updates:
AuthControllerto use the new registration and authentication DTOs and use cases, adding validation and improved HTTP response semantics (e.g., returning201 Createdon registration). ([src/main/java/com/soupulsar/modulith/auth/api/controllers/AuthController.javaL4-R36](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-affc9ddf0a603561caeaf06d26a82b7155cfffade0596b97b6dca8189e4f2957L4-R36))RegistrationUseCaseand its dependencies. ([[1]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-afbec6d62b82b5b9d0945465dfeec586e369bdd3bc27bd8841dfd7468169b4e4L6-R8),[[2]](https://github.com/MateusOK/pulsar-api/pull/7/files#diff-afbec6d62b82b5b9d0945465dfeec586e369bdd3bc27bd8841dfd7468169b4e4L20-R24))These changes lay the groundwork for a scalable, role-based user management system with extensible profile data for different user types.