registerApiKeySecurityScheme

fun Application.registerApiKeySecurityScheme(name: String? = null, keyName: String, keyLocation: SecuritySchemeIn, description: String = ApiKeySecurityScheme.DEFAULT_DESCRIPTION)(source)

Registers an API Key authentication security scheme.

Report a problem

Parameters

name

The name of the security scheme. Defaults to "default".

keyName

The name of the header, query, or cookie parameter.

keyLocation

The location of the API key (header, query, or cookie).

description

Optional description for the security scheme. Defaults to "API Key Authentication".