Interface ITenantsAccessor
- Namespace
- GroupeIsa.Neos.Shared.MultiTenant
- Assembly
- GroupeIsa.Neos.Shared.dll
Provides access to information about tenants of application.
public interface ITenantsAccessor
Methods
GetAuthorizedTenantsAsync(string, string, CancellationToken)
Tries to get the authorized tenants for the specified user on a cluster.
Task<IEnumerable<AuthorizedTenant>> GetAuthorizedTenantsAsync(string clusterName, string userId, CancellationToken cancellationToken = default)
Parameters
clusterNamestringThe cluster name.
userIdstringThe user identifier.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<AuthorizedTenant>>
The authorized tenant identifiers.
GetClustersAsync(string, CancellationToken)
Gets the clusters associated with the specified tenant identifier.
Task<IEnumerable<ClusterIdentifier>> GetClustersAsync(string tenantIdentifier, CancellationToken cancellationToken = default)
Parameters
tenantIdentifierstringThe identifier of the tenant.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<ClusterIdentifier>>
A task that represents the asynchronous operation. The task result contains the list of cluster identifiers.
GetTenantInfoAsync(string, string, string, CancellationToken)
Gets information about the specified tenant.
Task<NeosTenantInfo?> GetTenantInfoAsync(string clusterName, string clusterVersion, string tenantIdentifier, CancellationToken cancellationToken = default)
Parameters
clusterNamestringThe cluster name.
clusterVersionstringThe cluster version.
tenantIdentifierstringThe tenant identifier.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task<NeosTenantInfo>
The tenant information or null if the tenant doesn't exist.