Skip to content

Commit 8d96d74

Browse files
committed
Require flow parameter for OAuth Init endpoint
1 parent c3d8556 commit 8d96d74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

API/Controller/OAuth/Authorize.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.ComponentModel.DataAnnotations;
12
using Microsoft.AspNetCore.Mvc;
23
using Microsoft.AspNetCore.RateLimiting;
34
using OpenShock.API.OAuth;
@@ -20,7 +21,7 @@ public sealed partial class OAuthController
2021
[EnableRateLimiting("auth")]
2122
[HttpPost("{provider}/authorize")]
2223
[ApiExplorerSettings(IgnoreApi = true)]
23-
public async Task<IActionResult> OAuthAuthorize([FromRoute] string provider, [FromQuery(Name="flow")] OAuthFlow flow)
24+
public async Task<IActionResult> OAuthAuthorize([FromRoute] string provider, [FromQuery(Name="flow"), Required] OAuthFlow flow)
2425
{
2526
if (!await _schemeProvider.IsSupportedOAuthScheme(provider))
2627
return Problem(OAuthError.UnsupportedProvider);

0 commit comments

Comments
 (0)