Class OAuthTokenResponse
- Namespace
- MailFathom.Common.OAuth
- Assembly
- MailFathom.Common.dll
The subset of an RFC 6749 token endpoint response MailFathom reads.
public sealed record OAuthTokenResponse : IEquatable<OAuthTokenResponse>
- Inheritance
-
OAuthTokenResponse
- Implements
- Inherited Members
Remarks
A success and a failure are one type because RFC 6749 returns them from the same endpoint in the same media type,
and because which one arrived is decided by the presence of a member rather than by the status code alone —
authorization servers exist that answer a rejected grant with 200.
error_description and error_uri are deliberately unmapped. Both are free text an authorization server
may populate with the request it rejected, so reading them would risk copying a client secret into a log through a
field nobody controls.
Constructors
- OAuthTokenResponse(string?, int?, string?, string?)
The subset of an RFC 6749 token endpoint response MailFathom reads.
Properties
- AccessToken
The issued bearer token.
- Error
The error code from a rejected request, absent from a successful one.
- ExpiresInSeconds
The lifetime the authorization server stated, or null when it stated none.
- RefreshToken
The long-lived token an interactive authorization returns, absent from an ordinary refresh at run time.
Methods
- ToString()
Returns a string that represents the current object.