authorization
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace TURN.Services.Chess.Controllers
|
||||
{
|
||||
[Authorize(AuthenticationSchemes = AuthSchemes, Roles = "admin")]
|
||||
[Route("/[controller]")]
|
||||
[ApiController]
|
||||
public class TurnController : ControllerBase
|
||||
{
|
||||
public const string AuthSchemes = JwtBearerDefaults.AuthenticationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// Тестовый гет.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user