Skip to content

Implemented Authentication & Authorization#8

Merged
owolabiezekiel merged 33 commits into
mainfrom
feature/implement-auth
Feb 11, 2026
Merged

Implemented Authentication & Authorization#8
owolabiezekiel merged 33 commits into
mainfrom
feature/implement-auth

Conversation

@Semilore317
Copy link
Copy Markdown
Collaborator

  • Created the user entity
  • Created roles and permission enums
  • Created signup and login endpoints
  • Protected the other endpoints from being accessed without correct roles and permission.

…ng: JwtUtil, UserDetailsServiceImpl, JwtAuthenticationFilter, SecurityConfig, and added getPermissions() method to Role enum. Code formatting applied via Spotless
added @EntityListener annotation and @createdat and @lastmodified date to baseEntity, this fixes the entity creation flow
Copy link
Copy Markdown
Collaborator

@owolabiezekiel owolabiezekiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know if you have tested this and it works(I believe it should) but I am not impressed because all I see in this code is AI everywhere. fix the comments

Comment thread src/main/resources/application.yaml Outdated
@Semilore317
Copy link
Copy Markdown
Collaborator Author

I've implemented the necessary changes sir.

@owolabiezekiel
Copy link
Copy Markdown
Collaborator

Was this tested and everything still works?

@Semilore317
Copy link
Copy Markdown
Collaborator Author

Yes sir

@owolabiezekiel owolabiezekiel merged commit dfdb527 into main Feb 11, 2026
1 check passed
Semilore317 added a commit that referenced this pull request Apr 6, 2026
* added jjwt dependencies in pom.xml file

* chore: ignore secrets directory

* added user entity and role-based permissions

* added relationship between user and transactions

* implemented userRepository

* added database migration xml files

* created SignupRequest

* created LoginRequest DTO

* corrected LoginRequest DTO design

* added AuthResponse DTO

* reformatted UserDto as a record and corrected error in User entity

* fixed inconsitencies in DTOs

* fixed inconsistencies in DTOs

* Successfully implemented all security components with proper formatting: JwtUtil, UserDetailsServiceImpl, JwtAuthenticationFilter, SecurityConfig, and added getPermissions() method to Role enum. Code formatting applied via Spotless

* added extra exception classes

* updated the GlobalExceptionHandler class

* added the EmailAlreadyExistsException class

* added the UsernameAlreadyExistsException class

* added the InvalidCredentialException class

* modified the GlobalExceptionHandler

* scaffolded UserService class

* implemented the userService

* removed unnecessary comments and implemented AuthController

* implemented auth controller and removed redudant comments

* fixed bug with app not starting

* fixed issue where JPA wasn't adding timestamps to base entitiy

added @EntityListener annotation and @createdat and @lastmodified date to baseEntity, this fixes the entity creation flow

* modified Filter Chain to change endpoint access

* added loggin to JwtAuthenticationFilter to detect the issue

* refactored secrets file

* fixed issue with system_admin credentials

* removed unneeded config in application.yaml

* added preAuthorize annotation to /me endpoint

* added JWT_SECRET to IDEA environment variables
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