Table of Contents

Interface ITenants

Namespace
GroupeIsa.Neos.Application.MultiTenant
Assembly
GroupeIsa.Neos.Application.Abstractions.dll

Provides the functionalities of tenants management.

public interface ITenants

Properties

MultitenancyEnabled

Gets a value indicating whether the multitenancy is enabled.

bool MultitenancyEnabled { get; }

Property Value

bool

Methods

GetAuthenticatedResultAsync()

Gets the authenticated result from tenants authorization.

Task<OnAuthenticatedResult> GetAuthenticatedResultAsync()

Returns

Task<OnAuthenticatedResult>

The authenticated result.

GetAuthorizedTenantsAsync()

Gets the authorized tenants for the authenticated user.

Task<IEnumerable<AuthorizedTenant>> GetAuthorizedTenantsAsync()

Returns

Task<IEnumerable<AuthorizedTenant>>

The authorized tenant identifiers.

GetCurrentTenant()

Gets the information about the current tenant.

NeosTenantInfo? GetCurrentTenant()

Returns

NeosTenantInfo

The current tenant on null if there is not current tenant.

GetCurrentTenantIdentifier()

Gets the current tenant identifier.

string GetCurrentTenantIdentifier()

Returns

string

The current tenant identifier.

IsAuthorizedAsync()

Gets a value indicating whether the authenticated user is authorized for the current tenant.

Task<bool> IsAuthorizedAsync()

Returns

Task<bool>

true if the user is authorized, false otherwise.

SetCurrentTenant(NeosTenantInfo)

Sets a tenant in the current scope.

void SetCurrentTenant(NeosTenantInfo neosTenantInfo)

Parameters

neosTenantInfo NeosTenantInfo

The tenant info.

SetCurrentTenantAsync(string)

Sets a tenant in the current scope.

Task<bool> SetCurrentTenantAsync(string tenantId)

Parameters

tenantId string

The tenant identifier.

Returns

Task<bool>

true if the operation has been completed with success, false otherwise.