Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects

Login registration

Merged Imported Sefriano Edsel Jieftara Djie requested to merge login-registration into main

Created by: KronosDP

This pull request includes several significant changes to the pom.xml file and the addition of new classes and configurations for user authentication and security in the safetypin project. The most important changes include the update of dependencies, the addition of new DTOs, controllers, models, exceptions, and security configurations.

Dependency Updates and Additions:

  • Updated junit-jupiter-api to junit-jupiter and version to 5.11.2.
  • Added org.postgresql:postgresql dependency for runtime.
  • Added several Spring Boot dependencies including spring-boot-starter-data-jpa, spring-boot-starter-security, h2, spring-security-test, spring-boot-starter-validation, and spring-boot-starter-test.

New Controllers and DTOs:

  • Created AuthenticationController with endpoints for email and social registration, OTP verification, login, password reset, and a placeholder dashboard.
  • Added DTOs for ErrorResponse, PasswordResetRequest, RegistrationRequest, and SocialLoginRequest to handle requests and responses.

Models and Repositories:

  • Introduced User model with fields for email, password, name, verification status, role, birthdate, provider, and social ID.
  • Created UserRepository interface extending JpaRepository for database operations on User entities.

Security Configurations:

  • Configured password encoding using BCryptPasswordEncoder in PasswordEncoderConfig.
  • Set up security configurations in SecurityConfig to disable CSRF, allow all requests, and manage sessions statelessly.

Exception Handling:

  • Added custom exceptions InvalidCredentialsException and UserAlreadyExistsException for handling specific error cases.

These changes collectively enhance the authentication and security features of the application, ensuring better user management and secure handling of credentials.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading