Table of Contents

Interface IAuthorizedPrincipalSource

Namespace
MailFathom.Application.Access
Assembly
MailFathom.Application.dll

Reports whoever the unit of work in hand is running for.

public interface IAuthorizedPrincipalSource

Remarks

The one seam between the application layer and whatever admitted the work. An adapter outside this layer populates it per unit of work — a host adapter from the authenticated principal of a request, a route from a capability it has just verified — so that nothing here has to know what a request, a scheme, or a claim is.

null is a real answer and means the work was reached under none of the three principal kinds. It is never read as permission: AccessAuthorization refuses it, so an entrypoint that forgets to state what it admitted fails rather than being served.

An implementation is registered per unit of work, which for a served request is its scope. A use case asks AccessAuthorization rather than this port directly.

Properties

Current

Gets the principal this unit of work is running for, or null when it was reached under none.