Table of Contents

Interface IPrincipalTypeProvider

Namespace
Excalibur.A3.Governance.NonHumanIdentity
Assembly
Excalibur.A3.Governance.Abstractions.dll

Resolves the PrincipalType for a given principal identifier.

public interface IPrincipalTypeProvider

Remarks

Consumers implement this interface to integrate with their identity system (e.g., Azure AD, LDAP, custom user store) for principal classification. The framework provides a default implementation that returns Human for all principals (backward compatibility).

For extended classification beyond the built-in PrincipalType values, use GetService(Type) to access custom classification services.

Methods

GetPrincipalTypeAsync(string, CancellationToken)

Determines the principal type for the specified principal.

Task<PrincipalType> GetPrincipalTypeAsync(string principalId, CancellationToken cancellationToken)

Parameters

principalId string

The principal identifier to classify.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<PrincipalType>

The PrincipalType classification for the principal.

GetService(Type)

Gets a sub-interface or service from this provider for extended classification.

object? GetService(Type serviceType)

Parameters

serviceType Type

The type of service to retrieve.

Returns

object

The service instance, or null if not supported.