Skip to content

R. Yusup#4

Open
Yusuprozimemet wants to merge 1 commit into
HackYourAssignment:mainfrom
Yusuprozimemet:main
Open

R. Yusup#4
Yusuprozimemet wants to merge 1 commit into
HackYourAssignment:mainfrom
Yusuprozimemet:main

Conversation

@Yusuprozimemet

@Yusuprozimemet Yusuprozimemet commented Jul 8, 2026

Copy link
Copy Markdown
  • Add JJWT 0.12.6 dependencies and load secrets from a local .env file
  • Create JwtService to generate and verify signed tokens (15 min default
    lifetime, configurable via JWT_EXPIRATION_MS)
  • Create JwtAuthenticationFilter to authenticate requests from the
    Authorization: Bearer header
  • Create AppUserDetailsService to load users from the database for
    Spring Security
  • Configure stateless security: /users/register and /auth/login are
    public, everything else requires a valid token, failures return 401
  • Hash passwords with BCrypt on registration and reject duplicate
    usernames with 409
  • Add authenticated GET /users/profile endpoint and .env.example

@Yusuprozimemet Yusuprozimemet changed the title Add JWT authentication with user registration and login R. Yusup Jul 8, 2026
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.

1 participant