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

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -