Browse Source

Add returnUrlHash to returnUrl.

pull/8002/head
maliming 5 years ago
parent
commit
204e449eaa
  1. 6
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpController.cs
  2. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs

6
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpController.cs

@ -108,12 +108,12 @@ namespace Volo.Abp.AspNetCore.Mvc
return localizer;
}
protected RedirectResult RedirectSafely(string returnUrl, string returnUrlHash = null)
protected virtual RedirectResult RedirectSafely(string returnUrl, string returnUrlHash = null)
{
return Redirect(GetRedirectUrl(returnUrl, returnUrlHash));
}
private string GetRedirectUrl(string returnUrl, string returnUrlHash = null)
protected virtual string GetRedirectUrl(string returnUrl, string returnUrlHash = null)
{
returnUrl = NormalizeReturnUrl(returnUrl);
@ -125,7 +125,7 @@ namespace Volo.Abp.AspNetCore.Mvc
return returnUrl;
}
private string NormalizeReturnUrl(string returnUrl)
protected virtual string NormalizeReturnUrl(string returnUrl)
{
if (returnUrl.IsNullOrEmpty())
{

4
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs

@ -24,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication
return RedirectSafely(returnUrl, returnUrlHash);
}
return Challenge(new AuthenticationProperties {RedirectUri = returnUrl}, ChallengeAuthenticationSchemas);
return Challenge(new AuthenticationProperties {RedirectUri = GetRedirectUrl(returnUrl, returnUrlHash)}, ChallengeAuthenticationSchemas);
}
[HttpGet]
@ -37,7 +37,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication
return RedirectSafely(returnUrl, returnUrlHash);
}
return SignOut(new AuthenticationProperties {RedirectUri = returnUrl}, ChallengeAuthenticationSchemas);
return SignOut(new AuthenticationProperties {RedirectUri = GetRedirectUrl(returnUrl, returnUrlHash)}, ChallengeAuthenticationSchemas);
}
[HttpGet]

Loading…
Cancel
Save