mmaillot
01/07/2018, 9:44 PMoperator fun invoke() = Filter { next ->
{ request ->
if (!checkAuthKey(request.header("Authorization"))) {
Response(Status.UNAUTHORIZED)
} else {
next(request)
}
}
}
Can I inject the authenticated user (object) in the request ? Or should I load authenticated user when I consume the request ?