Method SignedCapability
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
SignedCapability(UserId, string)
Describes the principal a verified signature produced.
public static AuthorizedPrincipal SignedCapability(UserId user, string authorizedObject)
Parameters
userUserIdThe user the capability was minted for, whose mail is the only mail it reaches.
authorizedObjectstringMailFathom's own description of the one object the signature was bounded to.
Returns
- AuthorizedPrincipal
The principal the use case behind the capability is consulted with.
Remarks
The bound itself stays where a signature put it: the verified ticket the use case is handed names the object, and reading that is what confines the work. What this principal adds is the statement that a signature — rather than a credential or this process — is what authorized the work at all, so a use case reached under a capability admits that kind by name instead of admitting an unidentified caller. The user is carried beside it because a capability is redeemed by whoever holds the URL, and the mail behind it is one user's rather than the deployment's.
Exceptions
- ArgumentNullException
Thrown when
authorizedObjectis null.- ArgumentException
Thrown when
authorizedObjectis empty or white space, or whenusernames nobody.