diff options
author | ms <ms@taler.net> | 2021-06-21 12:46:01 +0200 |
---|---|---|
committer | ms <ms@taler.net> | 2021-06-21 12:46:01 +0200 |
commit | 62d04901d6d9ec98ea42bdf192fa7ed048a57dbc (patch) | |
tree | 79466cc0fd24dc9010ca5858ed8d96db806d526c | |
parent | aac64654698340f547ae847a72c716ae7a0a3f64 (diff) | |
download | libeufin-62d04901d6d9ec98ea42bdf192fa7ed048a57dbc.tar.gz libeufin-62d04901d6d9ec98ea42bdf192fa7ed048a57dbc.tar.bz2 libeufin-62d04901d6d9ec98ea42bdf192fa7ed048a57dbc.zip |
Importing dependencies to implement form-based authentication.
This will allow the Sandbox/Bank customers to login into their
accounts.
-rw-r--r-- | sandbox/build.gradle | 1 | ||||
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sandbox/build.gradle b/sandbox/build.gradle index ce04568e..c2cb39a3 100644 --- a/sandbox/build.gradle +++ b/sandbox/build.gradle @@ -66,6 +66,7 @@ dependencies { implementation "io.ktor:ktor-client-apache:$ktor_version" implementation "io.ktor:ktor-server-netty:$ktor_version" implementation "io.ktor:ktor-jackson:$ktor_version" + implementation "io.ktor:ktor-auth:$ktor_version" testImplementation 'org.jetbrains.kotlin:kotlin-test-junit:1.4.30-RC' testImplementation 'org.jetbrains.kotlin:kotlin-test:1.4.30-RC' diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt index 25ef80f6..3d965170 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -69,6 +69,7 @@ import com.google.common.collect.Maps import com.google.common.io.Resources import execThrowableOrTerminate import io.ktor.application.ApplicationCall +import io.ktor.auth.* import io.ktor.http.* import io.ktor.http.content.* import io.ktor.request.* @@ -224,6 +225,12 @@ fun serverMain(dbName: String, port: Int) { this.level = Level.DEBUG this.logger = myLogger } + install(Authentication) { + // Web-based authentication for Bank customers. + form { + + } + } install(ContentNegotiation) { jackson { enable(SerializationFeature.INDENT_OUTPUT) |