Table of Contents

Class PendingAuthorization

Namespace
MailFathom.Common.MailboxOAuth
Assembly
MailFathom.Common.dll

An authorization request that has been built and is waiting for the person to return its code.

public sealed record PendingAuthorization : IEquatable<PendingAuthorization>
Inheritance
PendingAuthorization
Implements
Inherited Members

Remarks

This is the shape that makes a headless server workable without a browser anywhere near it. The person opens the address on their own computer, signs in, and the authorization server redirects to a loopback address that nothing is listening on. The browser then shows a connection error — and the address bar holds the authorization code, which the operator pastes back. The failed redirect is the point rather than a defect: the code never leaves the person's machine over the network.

Properties

AuthorizationUrl

Gets the address the person opens, on whichever machine has a browser.

ExpectedState

Gets the value the returned redirect must echo, which the command checks before redeeming.

Methods

MatchesReturnedState(string?)

Reports whether a redirect echoed the value this authorization was issued with.