Config

A configuration for the bearer authentication provider.

Constructors

Link copied to clipboard
fun Config(name: String?)

Functions

Link copied to clipboard

Exchanges the token for a Principal.

Link copied to clipboard
fun authHeader(getAuthHeader: (ApplicationCall) -> HttpAuthHeader?)

Retrieves an HTTP authentication header. By default, it parses the Authorization header content.

Link copied to clipboard
fun authSchemes(defaultScheme: String = AuthScheme.Bearer, vararg additionalSchemes: String)

Provide the auth schemes accepted when validating the authentication. By default, it accepts the "Bearer" scheme.

Link copied to clipboard
fun skipWhen(predicate: (ApplicationCall) -> Boolean)

Adds an authentication filter to the list. For every application call the specified predicate is applied and if it returns true then the authentication provider is skipped (no auth required for this call with this provider).

Properties

Link copied to clipboard
val name: String?

is the name of the provider, or null for a default provider.

Link copied to clipboard
var realm: String? = null

Specifies an options Bearer realm to be passed in WWW-Authenticate header.