scala - Referencing logged in user in akka-http -
we using akka-http (scala version) create api. authenticate (and authorize) users in our routes. once authenticated, call services complete our crud operations. services plain scala classes , traits.
what wanting access authenticated user inside of scala service (class/trait) call route without explicitly passing user info. service may call other services , i'd refrain passing authenticated user implicit or explicit parameter down call chain.
in non-actor world employ threadlocal or dynamicvariable attach user information thread pull out , reference later. understand concepts don't play or apply akka-based systems. there mechanism accomplish i'm going for?
Comments
Post a Comment