From 0b0d3c4984483d1998f1adf7f04d3c5b7262feef Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 30 Jul 2023 19:25:56 +0800 Subject: [PATCH] Add `Challenge` method to `ChallengeAccountController`. --- .../Mvc/Authentication/ChallengeAccountController.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs index 15abd26b1e..7e40efc951 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs @@ -76,4 +76,11 @@ public abstract class ChallengeAccountController : AbpController : ForbidSchemes )); } + + [HttpGet] + public virtual async Task Challenge(string returnUrl = "", string returnUrlHash = "") + { + await HttpContext.SignOutAsync(); + return Challenge(new AuthenticationProperties { RedirectUri = GetRedirectUrl(returnUrl, returnUrlHash) }, ChallengeAuthenticationSchemas); + } }