Api Key Auth Handler
Server-side handler for AuthType.ApiKey, implementing AuthHandler.
Functions
Link copied to clipboard
context(auth: AuthType.ApiKey, _: Raise<Issue>)
open override fun authenticate(request: Request): Principal
open override fun authenticate(request: Request): Principal
Authenticates the given request by looking up its ApiKeyAuth header, rejecting missing, unknown, revoked, or expired keys, and returns the Principal (the key's owning user) on success.
Link copied to clipboard
Standard authentication routes provided by the handler.
Link copied to clipboard
context(_: Raise<Issue>, auth: AuthType.ApiKey, principal: Principal)
fun createApiKey(request: ApiKeyRequestModel): ApiKeyCreatedModel
fun createApiKey(request: ApiKeyRequestModel): ApiKeyCreatedModel
Creates a new API key owned by the currently authenticated principal. The raw key is only ever available in the returned ApiKeyCreatedModel; only its salted hash is persisted.
Link copied to clipboard
Lists the API keys owned by the currently authenticated principal, excluding the raw key values.
Link copied to clipboard