21 lines
747 B
C#
21 lines
747 B
C#
|
using System;
|
||
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||
|
using Microsoft.AspNetCore.Authorization;
|
||
|
using Microsoft.AspNetCore.Cors;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace BlueWest.WebApi.Controllers;
|
||
|
|
||
|
[ApiController]
|
||
|
[Route("application")]
|
||
|
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
||
|
[Authorize(AuthenticationSchemes = CookieAuthenticationDefaults.AuthenticationScheme)]
|
||
|
[EnableCors(Constants.CorsPolicyName)]
|
||
|
public class ApplicationController : ControllerBase
|
||
|
{
|
||
|
[HttpGet]
|
||
|
[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
|
||
|
public ContentResult GetTimeTicks() => Content(
|
||
|
DateTime.Now.Ticks.ToString());
|
||
|
}
|