Constructor OAuthTokenResponse
- Namespace
- MailFathom.Common.OAuth
- Assembly
- MailFathom.Common.dll
OAuthTokenResponse(string?, int?, string?, string?)
The subset of an RFC 6749 token endpoint response MailFathom reads.
public OAuthTokenResponse(string? AccessToken, int? ExpiresInSeconds, string? Error, string? RefreshToken = null)
Parameters
AccessTokenstringThe issued bearer token.
ExpiresInSecondsint?The lifetime the authorization server stated, or null when it stated none.
ErrorstringThe error code from a rejected request, absent from a successful one.
RefreshTokenstringThe long-lived token an interactive authorization returns, absent from an ordinary refresh at run time.
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.