<cite>alper: </cite> Can you open an issue on GitHub to make it changeable? <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/new">https://github.com/aspnetboilerplate/as ... issues/new</a>
Ok,I will create an issue for it. Thanks
<cite>alper: </cite> yes, you're right. it's a const. did you try to run the tests without that change?
Not yet.Because of that AbpTenantBase.DefaultTenantName can't be changed from metadata,when I try to use seed method the default tenant gets created which I don't want to.I want to create a tenant with another name.Is it possible to do that?
<cite>alper: </cite> hi,
If you want to change the name "Default" for the default tenancy name.
- TenantConsts > DefaultTenantName = "MyDefault"
- AbpTenantBase > DefaultTenantName = "MyDefault"
- UserLinkAppService_Tests > LinkToUser() > TenancyName = "MyDefault"
we can't change the DefaultTenantName in AbpTenantBase as it is metadata file.How to do that?
Hi, I am trying to delete an existing Default Tenant and recreate databases with another tenant name which will have dedicated database for it. That works fine,but my unit test cases are always pointing to Default tenant and now they are failing. What is the right way to create a new Tenant instead of Default one after Host creation.Also unit test cases should be pointing to that tenant. Any help will be appreciated.
<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
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; }
}
I want to configure identity server 4 to implement personal access token.
I am planning to store the identity server's client information (clientID, clienSecret) into the database . So, from client's app user will going to enter the client credentials and in response api will return the access token. Client Id and Client Secrets information will be stored per tenant, so based on the tenant, we must get the client information and in response to it, the access token.
Is there any sample implementation as such to get the clients stored in the database ?
Thanks
Hi,
I am using wildcard sub-domain for my multi-tenant application. Can we set the tenantId (Abp session) globally for the requested url?
I found some discussion on the forum : #2310@6e258722-a095-43e8-accf-7aa230655e10
But, this is not working for me. :(
I want to detect the tenancy name from the subdomain, check it is existing or not. If it is existing, then set the abp tenantId globally so that I will not have to put the tenancy name explicitly .
Thanks.
Hi,
I want to hide some API's only on Swagger UI but these hidden should be called from client script(Javascript).
I want to hide all the inbuilt API's of Asp.Net zero and show only the API's written by me. These hidden API's should work whenever we call from the script.
I have tried some options like setting the attribute on the appservices/methods:
These works well for hiding them on Swagger but, they no more exists while calling such appservices from the javascript.
Thnaks.