import io.ktor.server.application.Application
import io.ktor.server.application.install
import io.ktor.server.auth.Authentication
data class Config(val signingKey: String)
const val ExampleAuth = "example"
fun Application.configureSecurity(config: Config) {
install(Authentication) {
hmacSha256(ExampleAuth) {
headerName = "X-Example-Signature"
signingKey = config.signingKey
onUnauthorized { throw it }
}
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Ktor HMAC Authentication
License
chrsblck/ktor-hmac-auth
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Ktor HMAC Authentication
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published