Table of Contents

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

clusterName string

The cluster name.

userId string

The user identifier.

cancellationToken CancellationToken

The 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

tenantIdentifier string

The identifier of the tenant.

cancellationToken CancellationToken

The 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

clusterName string

The cluster name.

clusterVersion string

The cluster version.

tenantIdentifier string

The tenant identifier.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<NeosTenantInfo>

The tenant information or null if the tenant doesn't exist.