Authentication

class Authentication

Authentication feature supports pluggable mechanisms for checking and challenging a client to provide credentials

Parameters

config - initial authentication configuration

Types

Configuration

class Configuration

Authentication configuration

Feature

companion object Feature : 
    ApplicationFeature<Application, Configuration, Authentication>

Installable feature for Authentication.

Constructors

<init>

Authentication(providers: List<AuthenticationProvider>)
Authentication()
Authentication(config: Configuration)

Authentication feature supports pluggable mechanisms for checking and challenging a client to provide credentials

Functions

configure

fun configure(block: Configuration.() -> Unit): Unit

Configure already installed feature

interceptPipeline

fun interceptPipeline(
    pipeline: ApplicationCallPipeline,
    configurationNames: List<String?> = listOf(null),
    optional: Boolean = false
): Unit

Configures pipeline to process authentication by one or multiple auth methods

Companion Object Properties

AuthenticatePhase

val AuthenticatePhase: PipelinePhase

Authenticate phase in that authentication procedures are executed. Please note that referring to the phase is only possible after feature installation.

ChallengePhase

val ChallengePhase: PipelinePhase

Authenticate phase in that auth provider’s challenges performing. Please note that referring to the phase is only possible after feature installation.

key

Unique key that identifies a feature

Companion Object Functions

install

fun install(
    pipeline: Application,
    configure: Configuration.() -> Unit
): Authentication

Feature installation script