Class MailAccountOAuthOptions
- Namespace
- MailFathom.Infrastructure.Mail.OAuth
- Assembly
- MailFathom.Infrastructure.dll
Binds one account's OAuth settings and resolves the secrets a token request needs.
public sealed class MailAccountOAuthOptions
- Inheritance
-
MailAccountOAuthOptions
- Inherited Members
Remarks
This is the configuration adapter for an account's token acquisition, alongside MailAccountSecretOptions for its password and MailAccountTransportSecurityOptions for its transport rules. It stays mutable and binder-friendly, and every credential it names arrives as a reference, so an operator's configuration file holds no client secret and no refresh token.
MailFathom never obtains a refresh token: it has no console and serves no redirect callback, so the authorization
code is exchanged out of band by the operator and the resulting refresh token is provisioned like any other secret.
docs/operations/mailbox-oauth.md carries the recipe for each provider.
Properties
- ClientId
Gets or sets the registered application's client identifier.
- ClientSecret
Gets or sets the reference to the registered application's client secret, absent for a public client and when the account authenticates with a password.
- Grant
Gets or sets the RFC 6749 grant this account exchanges, either
refresh_tokenorclient_credentials.
- IsConfigured
Gets whether the operator configured this block at all.
- ParsedGrant
Gets the parsed grant, or the unspecified default when the configured name is not supported.
- PublicClient
Gets or sets whether the application is registered as a public client, which holds no secret.
- RefreshToken
Gets or sets the reference to the operator-provisioned refresh token, used only by the refresh-token grant.
- Scope
Gets or sets the space-delimited scopes the token request asks for.
- TokenEndpoint
Gets or sets the authorization server's token endpoint, which must be an absolute HTTPS address.
Methods
- ResolveClientMaterialAsync(ISecretReferenceResolver, CancellationToken)
Resolves the client secret and, when the grant needs one, the refresh token.