Jul 13, 2024
UserDetailsService
JWTService
to validate token against the userspring:
datasource:
url: jdbc:postgresql://localhost:5432/JWT-Security
username: amigocode
password: password
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: create-drop
show-sql: true
properties:
hibernate:
format_sql: true
@Entity
, @Table
, @Id
, @GeneratedValue
annotationsUserDetails
interface for Spring Security compatibilityJpaRepository<User, Integer>
Optional<User> findByEmail(String email)
OncePerRequestFilter
JWTService
jjwt-api
, jjwt-impl
, jjwt-jackson
SecurityFilterChain
bean)UsernamePasswordAuthenticationFilter
AuthenticationService
for business logicAuthenticationRequest
, AuthenticationResponse
, and RegisterRequest