Skip to content
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

Rename JwtRepository to AuthRepository #1456

Merged
merged 2 commits into from
Apr 25, 2024
Merged

Rename JwtRepository to AuthRepository #1456

merged 2 commits into from
Apr 25, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Apr 25, 2024

Summary

This renames the domain JwtRepository (now AuthRepository) as the logic is customised to our auth implementation.

Changes

  • Rename JwtRepository and interface to AuthRepository
  • Rename JwtAccessTokenPayload to AuthPayload, as well as associated builder
  • Rename JwtAccessTokenPayloadSchema to AuthPayload
  • Amend associated tests with appropriate naming

@iamacook iamacook self-assigned this Apr 25, 2024
@iamacook iamacook requested a review from a team as a code owner April 25, 2024 10:10
@iamacook iamacook changed the title Rename JwtRepository to AuthRepository Move and rename JwtRepository to AuthRepository Apr 25, 2024
@coveralls
Copy link

coveralls commented Apr 25, 2024

Pull Request Test Coverage Report for Build 8832561602

Details

  • 20 of 36 (55.56%) changed or added relevant lines in 8 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.5%) to 91.922%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/auth/entities/tests/auth-payload.entity.ts 0 16 0.0%
Files with Coverage Reduction New Missed Lines %
src/routes/transactions/entities/tests/human-description.builder.ts 1 90.0%
Totals Coverage Status
Change from base Build 8829404028: -0.5%
Covered Lines: 6881
Relevant Lines: 7221

💛 - Coveralls

@iamacook iamacook marked this pull request as draft April 25, 2024 12:20
@iamacook iamacook changed the title Move and rename JwtRepository to AuthRepository Rename JwtRepository to AuthRepository Apr 25, 2024
@iamacook
Copy link
Member Author

For future reference: this was originally moved to the routes layer after discussion with @hectorgomezv. However, after review we decided it would be better to remain on the domain layer, just renamed.

There is still a question of whether the JWT datasource is inherently a datasource and (if not) all should be located on the route layer. However, we agreed that this can be iterated on as it is currently easier to follow spread across layers.

@iamacook iamacook marked this pull request as ready for review April 25, 2024 12:33
@iamacook iamacook merged commit 31471b8 into main Apr 25, 2024
16 checks passed
@iamacook iamacook deleted the move-jwt-repo branch April 25, 2024 13:47
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.

None yet

3 participants