5 Answer(s)
-
0
Hi @bolenton,
It is defined here <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Runtime/Security/AbpClaimTypes.cs#L32">https://github.com/aspnetboilerplate/as ... pes.cs#L32</a>.
You can change it in your application if you would like to.
-
0
Thanks ismcagdas. But can you tell me how can I remove that url part from tenant Id as AbpClaimTypes is of metadata type and it has 4 references.So where can I do that and how - PrjName.Core\Authorization\Impersonation\ImpersonationManager.cs(55):
identity.AddClaim(new Claim(AbpClaimTypes.ImpersonatorTenantId, cacheItem.ImpersonatorTenantId.Value.ToString(CultureInfo.InvariantCulture)));PrjName.Core\Authorization\Impersonation\ImpersonationManager.cs(58):
identity.AddClaim(new Claim(AbpClaimTypes.ImpersonatorUserId, cacheItem.ImpersonatorUserId.ToString(CultureInfo.InvariantCulture)));PrjName..Core\Authorization\Users\UserLinkManager.cs(128):
identity.AddClaim(new Claim(AbpClaimTypes.ImpersonatorTenantId, cacheItem.ImpersonatorTenantId.Value.ToString(CultureInfo.InvariantCulture)));PrjName.Core\Authorization\Users\UserLinkManager.cs(133):
My AbpClaimTypes class is like this -
public static class AbpClaimTypes { // // Summary: // UserId. Default: System.Security.Claims.ClaimTypes.Name public static string UserName { get; set; } // // Summary: // UserId. Default: System.Security.Claims.ClaimTypes.NameIdentifier public static string UserId { get; set; } // // Summary: // UserId. Default: System.Security.Claims.ClaimTypes.Role public static string Role { get; set; } // // Summary: // TenantId. Default: http://www.aspnetboilerplate.com/identity/claims/tenantId public static string TenantId { get; set; } // // Summary: // ImpersonatorUserId. Default: http://www.aspnetboilerplate.com/identity/claims/impersonatorUserId public static string ImpersonatorUserId { get; set; } // // Summary: // ImpersonatorTenantId Default: http://www.aspnetboilerplate.com/identity/claims/impersonatorTenantId public static string ImpersonatorTenantId { get; set; } }
-
0
You can set it like below in the startup of your application
AbpClaimTypes.TenantId = "xxxxx";
But, don't set it to an empty string, otherwise it will cause some problems.
-
0
<cite>ismcagdas: </cite> You can set it like below in the startup of your application
AbpClaimTypes.TenantId = "xxxxx";
But, don't set it to an empty string, otherwise it will cause some problems.
Thank you ismcagdas. Your help is really appreciated.I was struggling with this issue from 4 days but your help solved that problem in 1 hour.Thanks a lot :D
-
0
thanks for your feedback