Hey! With Ktor server I was wondering how to run s...
# ktor
t
Hey! With Ktor server I was wondering how to run something in the pipeline after
AfterAuthentication
, I tried writing something like this,
Copy code
object ScopesChecked : Hook<suspend (ApplicationCall) -> Unit> {
    private val AfterAuthenticationPhase: PipelinePhase = PipelinePhase("AfterAuthentication")

    override fun install(
        pipeline: ApplicationCallPipeline,
        handler: suspend (ApplicationCall) -> Unit
    ) {
        // Intercept the after auth and handle our own phase
        pipeline.intercept(AfterAuthenticationPhase) { handler(call) }
    }
}
However after debugging a bit it looks like it only has access to these Pipeline Phases
Copy code
BeforeSetup
Setup
Monitoring
Plugins
BeforeCall
Call
BeforeFallback
Fallback
Thank you!
a
You can add a phase after the
ApplicationCallPipeline.Plugins
phase and intercept it. Can you explain what problem you are trying to solve?