validate

fun validate(body: suspend ApplicationCall.(String) -> P?)(source)

Sets a validation function for the API key string read from headerName.

Return a principal of type P when authentication succeeds, or null when the key is invalid.

Report a problem

Parameters

body

validation function called with the API key header value.