API reference
Method MapDiscordOAuthIngress
- Namespace
- DisCatSharp.Hosting.AspNetCore
- Assembly
- DisCatSharp.Hosting.AspNetCore.dll
MapDiscordOAuthIngress(IEndpointRouteBuilder)
Maps the DisCatSharp OAuth ingress callback endpoint.
public static RouteGroupBuilder MapDiscordOAuthIngress(this IEndpointRouteBuilder endpoints)
Parameters
endpointsIEndpointRouteBuilderThe endpoint route builder to update.
Returns
- RouteGroupBuilder
The configured OAuth route group.
Remarks
The callback route remains relative to the current route group so callers can nest the ingress surface under their own prefixes without changing the default OAuth path semantics. The callback request is normalized into DiscordOAuthCallbackRequest before it is handed to IDiscordOAuthCallbackHandler.
Exceptions
- ArgumentNullException
endpointsis null.- InvalidOperationException
DisCatSharp ASP.NET Core ingress services have not been registered on the application's service provider.