Hi, I read the documentation and the order the different resolving contributors are checked for TenantId. Can you please guide me in the framework where in the code those resolvers are called and where the TenantId Claim is added to the list of claims?
Thanks
4 Answer(s)
-
0
Hi,
You can check both files. TenantResolver's code is called in ClaimsAbpSession.
<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/MultiTenancy/TenantResolver.cs#L65">https://github.com/aspnetboilerplate/as ... ver.cs#L65</a> <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/Runtime/Session/ClaimsAbpSession.cs#L65">https://github.com/aspnetboilerplate/as ... ion.cs#L65</a>
-
0
I was confused as I couldn't find an Ioc registration for IAbpSession. Now that I know the ClaimsAbpSession is the only implementation it makes since with conventional registration, IAbpSession got resolved, and first time IAbpSession.TenantId is called, it will resolve it, correct?
-
0
Hi,
Yes, actually each time when you access IAbpSession.TenantId it is resolved.
-
0
Thanks :).
Also, I think it is being cached so that not to go through all the cycle again, according to documentation.