https://kotlinlang.org logo
#ktor
Title
# ktor
j

John Pali

10/15/2021, 8:56 PM
Hi guys, anybody has an idea how can I get the current authenticated user in my service layer? something similar to
SecurityContextHolder
in spring?
b

Big Chungus

10/16/2021, 6:32 PM
Should be mentioned in AuthenticationFeature docs
a

Aleksei Tirman [JB]

10/18/2021, 11:28 AM
You can get a principal (authenticated user) inside a route's handler https://ktor.io/docs/authentication.html#get-principal