Skip to content

Commit

Permalink
increased expiry limit on JWT tokens.
Browse files Browse the repository at this point in the history
  • Loading branch information
alwinsDen committed Nov 8, 2024
1 parent af65896 commit 49af6b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Authenticator(
.withClaim("email", email)
.withClaim("name", name)
.withClaim("id", id)
.withExpiresAt(Date(System.currentTimeMillis() + 600000))
.withExpiresAt(Date(System.currentTimeMillis() + 86_400_000))
.sign(Algorithm.RSA256(publicKey as RSAPublicKey, privateKey as RSAPrivateKey))
return token
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import io.ktor.server.auth.*
import io.ktor.server.auth.jwt.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import okhttp3.Response
import org.alwinsden.remnant.api_data_class.ResponseMessage
import org.alwinsden.remnant.models.User.UserSchemaService
import org.jetbrains.exposed.sql.Database
Expand All @@ -18,7 +17,6 @@ class GeneralManagementPOST(private val database: Database) {
val principal = call.principal<JWTPrincipal>()
val userId = principal!!.payload.getClaim("id").asInt()
val userInstance = UserSchemaService(database)
println("THIS API WAS ALWAYS CALLED.")
val userData = userInstance.readUserProfileId(
id = userId
).let {
Expand Down

0 comments on commit 49af6b6

Please sign in to comment.