iotgateway/WalkingTec.Mvvm/WalkingTec.Mvvm.Mvc/Auth/Attribute/AuthorizeJwtWithCookieAttribute.cs

15 lines
465 B
C#
Raw Permalink Normal View History

2021-12-14 06:10:44 +00:00
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
namespace WalkingTec.Mvvm.Mvc
{
public class AuthorizeJwtWithCookieAttribute : AuthorizeAttribute
{
public AuthorizeJwtWithCookieAttribute()
{
AuthenticationSchemes = $"{CookieAuthenticationDefaults.AuthenticationScheme},{JwtBearerDefaults.AuthenticationScheme}";
}
}
}