Table of Contents

Method Caller

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

Caller(string, IEnumerable<MailFathomPermission>)

Describes a caller the transport admitted.

public static AuthorizedPrincipal Caller(string identity, IEnumerable<MailFathomPermission> grantedPermissions)

Parameters

identity string

What the transport admitted the caller as, in the forms Identity describes.

grantedPermissions IEnumerable<MailFathomPermission>

The permissions the entry that admitted it resolved to, empty when it granted none.

Returns

AuthorizedPrincipal

The principal the use cases the caller reaches are consulted with.

Remarks

An unspecified permission is dropped rather than carried, because the struct default names no capability and holding one would mean holding nothing under a name that reads like something.

Exceptions

ArgumentNullException

Thrown when identity or grantedPermissions is null.

ArgumentException

Thrown when identity is empty or white space, which would leave a principal nothing can be reported by.