fix: update JwtService to handle default expiration and add tests for token generation
All checks were successful
Build And Publish Production Image / Build And Publish Production Image (push) Successful in 39s
All checks were successful
Build And Publish Production Image / Build And Publish Production Image (push) Successful in 39s
This commit is contained in:
@@ -40,7 +40,7 @@ class AuthServiceTest {
|
||||
fun should_returnValidClaims_when_jwtTokenParsed() {
|
||||
val realJwtService = JwtService(
|
||||
secret = "test-secret-key-for-testing-only-must-be-at-least-32-characters",
|
||||
expirationMs = 86400000L
|
||||
expirationMsRaw = "86400000"
|
||||
)
|
||||
val token = realJwtService.generateToken()
|
||||
|
||||
@@ -51,7 +51,7 @@ class AuthServiceTest {
|
||||
fun should_returnFalse_when_expiredTokenValidated() {
|
||||
val realJwtService = JwtService(
|
||||
secret = "test-secret-key-for-testing-only-must-be-at-least-32-characters",
|
||||
expirationMs = 1L
|
||||
expirationMsRaw = "1"
|
||||
)
|
||||
val token = realJwtService.generateToken()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user