🐛 Fixes authentication not working again
This commit is contained in:
@@ -2,5 +2,5 @@ kotlin.code.style=official
|
|||||||
exposed_version=0.61.0
|
exposed_version=0.61.0
|
||||||
h2_version=2.3.232
|
h2_version=2.3.232
|
||||||
kotlin_version=2.1.10
|
kotlin_version=2.1.10
|
||||||
ktor_version=3.1.3
|
ktor_version=3.4.2
|
||||||
logback_version=1.5.13
|
logback_version=1.5.32
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import io.ktor.server.auth.*
|
|||||||
fun Application.configureSecurity(dotenv: Dotenv) {
|
fun Application.configureSecurity(dotenv: Dotenv) {
|
||||||
val apiKey = dotenv["API_KEY"] ?: throw Exception("API_KEY not found")
|
val apiKey = dotenv["API_KEY"] ?: throw Exception("API_KEY not found")
|
||||||
|
|
||||||
authentication {
|
install(Authentication) {
|
||||||
bearer {
|
bearer {
|
||||||
realm = "/"
|
realm = "/"
|
||||||
authenticate { credential ->
|
authenticate { credential ->
|
||||||
|
|||||||
Reference in New Issue
Block a user