GGMM/GrossesMitaines/GrossesMitainesAPI/Controllers/UserController.cs

26 lines
736 B
C#
Raw Normal View History

2022-11-01 14:07:49 -04:00
using GrossesMitainesAPI.Data;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
namespace GrossesMitainesAPI.Controllers;
[EnableCors("_myAllowSpecificOrigins"), ApiController, Route("api/[controller]"),
Authorize(AuthenticationSchemes = "Identity.Application", Roles = "Administrateur")]
public class UserController : Controller {
private readonly UserManager<InventoryUser> _userMan;
private readonly SignInManager<InventoryUser> _signInMan;
public UserController(SignInManager<InventoryUser> signin, UserManager<InventoryUser> userman) {
this._signInMan = signin;
this._userMan = userman;
}
}