authenticate

fun <ERROR CLASS>.authenticate(vararg configurations: String? = arrayOf(null), optional: Boolean = false, build: <ERROR CLASS>.() -> Unit): <ERROR CLASS>

Creates a route that allows you to define authorization scope for application resources. This function accepts names of authentication providers defined in the Authentication plugin configuration.

See also

Parameters

configurations

names of authentication providers defined in the Authentication plugin configuration.

optional

when set, if no authentication is provided by the client, a call continues but with a null Principal.

Throws

MissingApplicationPluginException

if no Authentication plugin installed first.

if there are no registered providers referred by configurations names.