Interface IResolveTenant
Provides an abstraction for a service that resolves a users tenant.
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public interface IResolveTenant
Methods
ChooseTenantSignInAsync(Guid, Boolean, Boolean)
Chooses a tenant for a user that are associated with many tenants.
Declaration
Task<SignInResult> ChooseTenantSignInAsync(Guid tenantId, bool isPersistent, bool lockoutOnFailure)
Parameters
System.Guid
tenantId
The id of the tenant to choose. |
Boolean
isPersistent
Flag indicating whether the sign-in cookie should persist after the browser is closed. |
Boolean
lockoutOnFailure
Flag indicating if the user account should be locked if the sign in fails. |
Returns
System.Threading.Tasks.Task<SignInResult>
The task object representing the asynchronous operation containing the |
DeleteTemporaryTenantAsync()
Deletes the temporary tenant information, as an asynchronous operation.
Declaration
Task DeleteTemporaryTenantAsync()
Returns
System.Threading.Tasks.Task
|
GetLastSelectedTenantIndex()
Gets the index of the tenant choosen last time by the user.
Declaration
Task<int> GetLastSelectedTenantIndex()
Returns
System.Threading.Tasks.Task<System.Int32>
The index of the tenant choosen last time by the user. |
GetOrganisationKeysForUsernameDomainAsync(String)
Gets the organisation keys that has a trusted domain that matches the domain of the username, if any.
Declaration
Task<OrganisationKeys> GetOrganisationKeysForUsernameDomainAsync(string username)
Parameters
String
username
The username to match the domain name from. |
Returns
System.Threading.Tasks.Task<OrganisationKeys>
The task object representing the asynchronous operation containing the organisation keys that has matched the domain of the username, if any. |
GetTenantsAsync(Guid[])
Finds and returns a list of organisations, if any, who has any of the specified tenantIds
.
Declaration
Task<List<IOrganisation>> GetTenantsAsync(params Guid[] tenantIds)
Parameters
System.Guid[]
tenantIds
The tenant ID to search for. |
Returns
System.Threading.Tasks.Task<List<IOrganisation>>
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the tenants matching the specified |
RetrieveTemporaryTenantAsync()
Gets temporary tenant information, if any is available, as an asynchronous operation.
Declaration
Task<Guid?> RetrieveTemporaryTenantAsync()
Returns
System.Threading.Tasks.Task<System.Nullable<System.Guid>>
The unique identity of the tenant, or null if no tenant information is available. |
SaveTemporaryTenantAsync(IUser)
Saves temporary tenant information, as an asynchronous operation.
Declaration
Task SaveTemporaryTenantAsync(IUser user)
Parameters
IUser
user
The user to get the tenant from. |
Returns
System.Threading.Tasks.Task
The task object representing the asynchronous operation. |
SaveTemporaryTenantAsync(Guid)
Saves temporary tenant information, as an asynchronous operation.
Declaration
Task SaveTemporaryTenantAsync(Guid tenantId)
Parameters
System.Guid
tenantId
The unique identity of the tenant. |
Returns
System.Threading.Tasks.Task
The task object representing the asynchronous operation. |