Co-authored-by: Jeremiah Flaga <j.flaga@arcanys.com>
This commit is contained in:
parent
0cb8424fdc
commit
7c1261bf69
@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class AccountController : Controller
|
public class AccountController : Controller
|
||||||
{
|
{
|
||||||
private readonly ILogger<AccountController> _logger;
|
private readonly ILogger<AccountController> _logger;
|
||||||
@ -20,7 +20,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
|||||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public async Task<IActionResult> SignIn(string returnUrl)
|
public async Task<IActionResult> SignIn(string returnUrl)
|
||||||
{
|
{
|
||||||
var user = User as ClaimsPrincipal;
|
var user = User as ClaimsPrincipal;
|
||||||
|
@ -11,8 +11,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ViewModels;
|
using ViewModels;
|
||||||
using ViewModels.Pagination;
|
using ViewModels.Pagination;
|
||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
|
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class CampaignsController : Controller
|
public class CampaignsController : Controller
|
||||||
{
|
{
|
||||||
private readonly ICampaignService _campaignService;
|
private readonly ICampaignService _campaignService;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||||
@ -8,7 +9,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class CartController : Controller
|
public class CartController : Controller
|
||||||
{
|
{
|
||||||
private readonly IBasketService _basketSvc;
|
private readonly IBasketService _basketSvc;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||||
@ -7,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class OrderController : Controller
|
public class OrderController : Controller
|
||||||
{
|
{
|
||||||
private IOrderingService _orderSvc;
|
private IOrderingService _orderSvc;
|
||||||
|
@ -7,10 +7,11 @@ using WebMVC.Services.ModelDTOs;
|
|||||||
using Microsoft.eShopOnContainers.WebMVC.Services;
|
using Microsoft.eShopOnContainers.WebMVC.Services;
|
||||||
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
|
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
||||||
|
|
||||||
namespace WebMVC.Controllers
|
namespace WebMVC.Controllers
|
||||||
{
|
{
|
||||||
[Authorize(AuthenticationSchemes = "OpenIdConnect")]
|
[Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)]
|
||||||
public class OrderManagementController : Controller
|
public class OrderManagementController : Controller
|
||||||
{
|
{
|
||||||
private IOrderingService _orderSvc;
|
private IOrderingService _orderSvc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user