26 lines
736 B
C#
26 lines
736 B
C#
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;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|