🐛 Fix pass service swagger docs duplicate schema name cause 500
This commit is contained in:
@@ -23,11 +23,6 @@ public class OidcController(
|
|||||||
private const string StateCachePrefix = "oidc-state:";
|
private const string StateCachePrefix = "oidc-state:";
|
||||||
private static readonly TimeSpan StateExpiration = TimeSpan.FromMinutes(15);
|
private static readonly TimeSpan StateExpiration = TimeSpan.FromMinutes(15);
|
||||||
|
|
||||||
public class TokenExchangeResponse
|
|
||||||
{
|
|
||||||
public string Token { get; set; } = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpGet("{provider}")]
|
[HttpGet("{provider}")]
|
||||||
public async Task<ActionResult> OidcLogin(
|
public async Task<ActionResult> OidcLogin(
|
||||||
[FromRoute] string provider,
|
[FromRoute] string provider,
|
||||||
@@ -81,7 +76,7 @@ public class OidcController(
|
|||||||
/// Handles Apple authentication directly from mobile apps
|
/// Handles Apple authentication directly from mobile apps
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[HttpPost("apple/mobile")]
|
[HttpPost("apple/mobile")]
|
||||||
public async Task<ActionResult<TokenExchangeResponse>> AppleMobileLogin(
|
public async Task<ActionResult<AuthController.TokenExchangeResponse>> AppleMobileLogin(
|
||||||
[FromBody] AppleMobileSignInRequest request
|
[FromBody] AppleMobileSignInRequest request
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -118,7 +113,7 @@ public class OidcController(
|
|||||||
);
|
);
|
||||||
|
|
||||||
var token = auth.CreateToken(session);
|
var token = auth.CreateToken(session);
|
||||||
return Ok(new TokenExchangeResponse { Token = token });
|
return Ok(new AuthController.TokenExchangeResponse { Token = token });
|
||||||
}
|
}
|
||||||
catch (SecurityTokenValidationException ex)
|
catch (SecurityTokenValidationException ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user