Class DiscordOAuthCallbackResult
- Namespace
- DisCatSharp.Hosting.AspNetCore.Ingress.OAuth
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
Represents the outcome of processing a Discord OAuth authorization-code callback.
public sealed class DiscordOAuthCallbackResult
- Inheritance
-
DiscordOAuthCallbackResult
- Inherited Members
Remarks
Instances preserve normalized callback metadata that higher-level features such as linked roles and incoming webhooks can use without re-parsing the original authorization or callback URLs.
Properties
- AccessToken
Gets the exchanged access token when the callback completed successfully.
- AuthorizationParameters
Gets the normalized authorization request parameters derived from the stored pending request URI.
- CallbackParameters
Gets the normalized callback query parameters received by ASP.NET Core.
- CallbackUri
Gets the callback URI that was received by ASP.NET Core.
- Code
Gets the authorization code received from Discord.
- Detail
Gets the human-readable callback detail for non-success outcomes.
- Exception
Gets the underlying exception, when one was captured.
- GrantedScope
Gets the scope granted by the exchanged Discord access token, when available.
- HasIncomingWebhookPayload
Gets a value indicating whether the token response preserved an incoming webhook payload.
- IncomingWebhookPayload
Gets the preserved incoming webhook payload from the token response, when available.
- IntegrationType
Gets the Discord integration type associated with the callback, when available.
- IsSuccess
Gets a value indicating whether the callback completed successfully.
- OAuthError
Gets the OAuth error returned by Discord, when available.
- OAuthErrorDescription
Gets the OAuth error description returned by Discord, when available.
- PendingState
Gets the consumed pending state entry, when one was available.
- RedirectUri
Gets the redirect URI used for the OAuth code exchange.
- RequestedScope
Gets the originally requested OAuth scope, when it was captured.
- State
Gets the callback state received from Discord.
- Status
Gets the callback processing status.
- TokenAdditionalProperties
Gets any additional token response properties preserved from the Discord OAuth token payload.
Methods
- ConfigurationFailure(string?, string?, string, IReadOnlyDictionary<string, string?>?, Uri?)
Creates a configuration-failure callback result.
- ExchangeFailure(string?, string?, DiscordIngressPendingState?, Uri?, Uri?, string, IReadOnlyDictionary<string, string?>?, IReadOnlyDictionary<string, string?>?, Exception?)
Creates a code-exchange failure callback result.
- InvalidRequest(string?, string?, string, string?, string?, IReadOnlyDictionary<string, string?>?, Uri?)
Creates an invalid-request callback result.
- InvalidState(string?, string?, string, IReadOnlyDictionary<string, string?>?, Uri?)
Creates an invalid-state callback result.