15 lines
465 B
C#
15 lines
465 B
C#
![]() |
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}";
|
||
|
}
|
||
|
}
|
||
|
}
|