for issue #1423: changed literal string "OpenIdConnect" to constant string (#1424)

Co-authored-by: Jeremiah Flaga <j.flaga@arcanys.com>
This commit is contained in:
jeremiahflaga 2020-09-14 17:26:22 +08:00 committed by GitHub
parent 0cb8424fdc
commit 7c1261bf69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 6 deletions

View File

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public class AccountController : Controller
{
private readonly ILogger<AccountController> _logger;
@ -20,7 +20,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public async Task<IActionResult> SignIn(string returnUrl)
{
var user = User as ClaimsPrincipal;

View File

@ -11,8 +11,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
using System.Threading.Tasks;
using ViewModels;
using ViewModels.Pagination;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public class CampaignsController : Controller
{
private readonly ICampaignService _campaignService;

View File

@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Services;
@ -8,7 +9,7 @@ using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public class CartController : Controller
{
private readonly IBasketService _basketSvc;

View File

@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Services;
@ -7,7 +8,7 @@ using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public class OrderController : Controller
{
private IOrderingService _orderSvc;

View File

@ -7,10 +7,11 @@ using WebMVC.Services.ModelDTOs;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
namespace WebMVC.Controllers
{
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
public class OrderManagementController : Controller
{
private IOrderingService _orderSvc;