Open Closed

Get Identity User Id in the service which called by Web API #66


0
daniel hussy created

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
    hikalkan created

    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: https://github.com/aspnetboilerplate/as ... ssion.html