ApiKeyResolver

fun interface ApiKeyResolver

Locates a raw API key string within an incoming request.

Implementations extract the key from a header, query parameter, cookie, or other io.javalin.http.Context source and return it, or null when absent. A null return leaves the request anonymous for authorization rules to decide. Resolvers must not throw when no key is present and must not perform key validation. Defaults to DEFAULT (header with X-Api-Key) when not configured.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun resolve(context: Context): String?

Returns the raw API key extracted from context, or null when absent.