Adds JWT secret, turns on Swagger UI, and cleans up refresh token response

This commit is contained in:
2026-05-12 00:26:35 -05:00
parent 0c01c5dbcc
commit 2e0244e1ee
7 changed files with 38 additions and 9 deletions

View File

@@ -7,11 +7,12 @@ import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
import java.util.Date
import javax.crypto.SecretKey
import javax.crypto.spec.SecretKeySpec
@Component
class JwtUtil {
@Value($$"${jwt.secret}")
private val jwtSecret: String? = null
private val jwtSecret: String = ""
@Value($$"${jwt.expiration}")
private val jwtExpirationMs = 0
@@ -22,7 +23,7 @@ class JwtUtil {
// preventing the repeated creation of the key and enhancing performance
@PostConstruct
fun init() {
this.key = Jwts.SIG.HS256.key().build()
this.key = SecretKeySpec(jwtSecret.toByteArray(Charsets.UTF_8), "HmacSHA256")
}
// Generate JWT token