Joris PZ
02/04/2022, 9:00 AMFoo
to run after the existing Authentication
plugin. When I try
val Foo = createApplicationPlugin("Foo") {
after(Authentication) {
}
}
the line starting with after
generates a compiler error:
Type mismatch.
Required: io.ktor.server.application.Plugin<*, *, PluginInstance>
Found: io.ktor.server.auth.Authentication.Plugin
The supertype of io.ktor.server.auth.Authentication.Plugin
is ApplicationPlugin<Application, Configuration, Authentication>
. Now I am not strong on generics, but I guess this is indeed not a subtype of the required io.ktor.server.application.Plugin<*, *, PluginInstance>
(Is this the same issue as you talk about here, @hhariri?)
Is there any way to make my plugin run after the Authentication plugin?Aleksei Tirman [JB]
02/04/2022, 9:16 AMRustam Siniukov
02/21/2022, 3:46 PMafter
/`before` blocks. Instead of them we will introduce hooks. Authentication
plugin will provide a hook that you can use to run after it.Joris PZ
02/22/2022, 7:09 AMJoris PZ
04/11/2022, 5:05 PMRustam Siniukov
04/11/2022, 5:16 PMAuthenticationChecked