Table of Contents

Method Caller

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

Caller(string, IEnumerable<MailFathomPermission>)

Describes a caller the transport admitted that acts for no user's mail.

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

This is the deployment administrator: a caller whose acts are the deployment's own rather than one person's mail. Every use case that reads or writes mail on somebody's behalf refuses it, so the administrative surface cannot become a way to read a mailbox by holding an administrative grant.

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.

Caller(string, ScopedGrant)

Describes a caller the transport admitted that acts for no user's mail, holding each permission at the scopes it was granted at.

public static AuthorizedPrincipal Caller(string identity, ScopedGrant grant)

Parameters

identity string

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

grant ScopedGrant

What the caller holds, each permission with the scopes it is held at.

Returns

AuthorizedPrincipal

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

Exceptions

ArgumentNullException

Thrown when identity or grant is null.

ArgumentException

Thrown when identity is empty or white space.