Package dev.forst.ktor.apikey

Types

Link copied to clipboard
typealias ApiKeyAuthChallengeFunction = suspend (ApplicationCall) -> Unit

Alias for function signature that is called when authentication fails.

Link copied to clipboard
typealias ApiKeyAuthenticationFunction = suspend ApplicationCall.(String) -> Principal?

Alias for function signature that is invoked when verifying header.

Link copied to clipboard
class ApiKeyAuthenticationProvider : AuthenticationProvider

Represents an API Key authentication provider.

Functions

Link copied to clipboard
fun AuthenticationConfig.apiKey(name: String? = null, configure: ApiKeyAuthenticationProvider.Configuration.() -> Unit)

Installs API Key authentication mechanism.