ribesg
03/15/2018, 2:23 PMauthentication
block to a bunch of routes but they're not all under a parent path of all authenticated routesDeactivated User
03/15/2018, 3:05 PMroute
?
https://ktor.io/features/routing.html#path
Something like:
route("/") {
install(auth) {}
get("/full/route1") {}
get("/other/route2") {}
}
(untested)Deactivated User
03/15/2018, 3:09 PMgroup { ... }
would be more obviousorangy
deviant
03/15/2018, 4:02 PMauthenticate {
// routes with auth rules applied
}
can't find a ticket in the repo. i believe it was thereavolkmann
03/15/2018, 4:42 PMorangy
orangy
d.bellingroth
03/16/2018, 7:30 AMval commonConfig : Route.() -> Unit = {
install(auth) {}
...
}
route("/route1") {
apply(commonConfig)
}
route("/route2") {
apply(commonConfig)
}
ribesg
03/16/2018, 1:43 PMDeactivated User
03/16/2018, 1:46 PMribesg
03/16/2018, 1:47 PMDeactivated User
03/16/2018, 2:01 PMorangy
auth-dsl
branch to see if it works for you