Code cleanup

This commit is contained in:
2025-08-17 16:35:27 -04:00
parent a6f021569c
commit 0c723f8f3f

View File

@@ -1,28 +1,16 @@
package codes.kalar
import java.io.File
import java.util.Properties
import com.auth0.jwt.JWT
import com.auth0.jwt.algorithms.Algorithm
import io.ktor.http.*
import io.ktor.serialization.kotlinx.json.*
import io.ktor.server.application.*
import io.ktor.server.auth.*
import io.ktor.server.auth.jwt.*
import io.ktor.server.plugins.contentnegotiation.*
import io.ktor.server.plugins.defaultheaders.*
import io.ktor.server.plugins.swagger.*
import io.ktor.server.request.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import java.sql.Connection
import java.sql.DriverManager
fun Application.configureSecurity() {
// Please read the jwt property from the config file if you are using EngineMain
val jwtAudience = environment.config.property("jwt.audience").toString()
val jwtDomain = environment.config.property("jwt.domain").toString()
val jwtRealm = "ktor sample app"
val jwtRealm = environment.config.property("jwt.realm").toString()
val jwtSecret = environment.config.property("jwt.secret").toString()
authentication {