using KingYSoft.Foretch.Controllers;
using Microsoft.AspNetCore.Antiforgery;

namespace KingYSoft.Foretch.Web.Host.Controllers
{
    public class AntiForgeryController : ForetchControllerBase
    {
        private readonly IAntiforgery _antiforgery;

        public AntiForgeryController(IAntiforgery antiforgery)
        {
            _antiforgery = antiforgery;
        }

        public void GetToken()
        {
            _antiforgery.SetCookieTokenAndHeader(HttpContext);
        }
    }
}