bdawg.io
09/18/2018, 7:58 PMDeactivated User
09/19/2018, 9:05 AMAccountSessionAuthenticationProvider
that is not included, and no clue about the register method eitherbdawg.io
09/19/2018, 5:57 PMio.ktor.auth.Authentication.Configuration.register(io.ktor.auth.AuthenticationProvider)
is the full header for the register methodbdawg.io
09/19/2018, 5:58 PMio.ktor.auth.AuthenticationProvider
and it having the two configuration options on it val authenticate: suspend (SessionToken) -> Principal? = provider.authenticate
val loginRedirectProvider: (ApplicationCall.() -> Url)? = provider.loginRedirectProvider
bdawg.io
09/19/2018, 5:59 PMclass AccountSessionAuthenticationProvider(name: String?) : AuthenticationProvider(name) {
internal var loginRedirectProvider: (ApplicationCall.() -> Url)? = null
private set
internal var authenticate: suspend (SessionToken) -> Principal? = { null }
private set
fun redirectToLogin(provider: ApplicationCall.() -> Url) {
loginRedirectProvider = provider
}
fun validate(validate: suspend (SessionToken) -> Principal?) {
authenticate = validate
}
}
bdawg.io
09/19/2018, 6:02 PMAuthorization
header. https://github.com/ktorio/ktor/blob/master/ktor-features/ktor-auth/src/io/ktor/auth/BasicAuth.kt