Configuration

class Configuration : AuthenticationProvider.Config

Api key auth configuration.

Functions

Link copied to clipboard
fun challenge(body: ApiKeyAuthChallengeFunction)

A response to send back if authentication failed.

Link copied to clipboard
fun skipWhen(predicate: (ApplicationCall) -> Boolean)
Link copied to clipboard
fun validate(body: suspend ApplicationCall.(String) -> Principal?)

Sets a validation function that will check given API key retrieved from headerName instance and return Principal, or null if credential does not correspond to an authenticated principal.

Properties

Link copied to clipboard
var authScheme: String

Name of the scheme used when challenge fails, see AuthenticationContext.challenge.

Link copied to clipboard
var headerName: String

Name of the header that will be used as a source for the api key.

Link copied to clipboard
val name: String?

Sources