Merge pull request #11 from scottaddie/scottaddie/cookies-auth-scheme
Replace hard-coded string with constant
This commit is contained in:
commit
20e2fe5ee6
|
|
@ -2,6 +2,7 @@
|
|||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace AuthSamples.ClaimsTransformer.Controllers
|
||||
|
|
@ -36,7 +37,7 @@ namespace AuthSamples.ClaimsTransformer.Controllers
|
|||
new Claim("role", "Member")
|
||||
};
|
||||
|
||||
await HttpContext.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity(claims, "Cookies", "user", "role")));
|
||||
await HttpContext.SignInAsync(new ClaimsPrincipal(new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme, "user", "role")));
|
||||
|
||||
if (Url.IsLocalUrl(returnUrl))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue