Hi Everybody!
My question is how can i get the user ID in my service which called from javascript via Web API? I need user ID for my Entity which has "string SendedById" property.
I have two separated database, the Boilerplate FW uses the first and the Identity FW uses the second. I don't want module Zero yet.
Where can i pass UserId to the Web API service?
Please help me!
1 Answer(s)
-
0
If you're using some authentication mechanism, then you can get current user id. For example, using Current Principal.
If you want to integrate this Id with rest of ABP, then you should implement IAbpSession interface.
While not published yet, you can see documentation here: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/doc/WebSiteContents/abp-session.html">https://github.com/aspnetboilerplate/as ... ssion.html</a>