Browse Source

Improved hard-coded AuthenticationType.

pull/2670/head
Galip Tolga Erdem 6 years ago
parent
commit
b5cb8a5808
  1. 4
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Authentication/ChallengeAccountController.cs

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

@ -8,10 +8,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication
public abstract class ChallengeAccountController : AbpController
{
protected string[] ChallengeAuthenticationSchemas { get; }
protected string AuthenticationType { get; }
protected ChallengeAccountController(string[] challengeAuthenticationSchemas = null)
{
ChallengeAuthenticationSchemas = challengeAuthenticationSchemas ?? new[] { "oidc" };
AuthenticationType = "Identity.Application";
}
[HttpGet]
@ -42,7 +44,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Authentication
{
await HttpContext.SignOutAsync().ConfigureAwait(false);
if (HttpContext.User.Identity.AuthenticationType == "Identity.Application")
if (HttpContext.User.Identity.AuthenticationType == AuthenticationType)
{
return RedirectSafely(returnUrl, returnUrlHash);
}

Loading…
Cancel
Save