JXMovies/Core/JXCMS.Core/Auth/BaseAuthorizeAttribute.cs
2020-02-09 19:10:05 +08:00

21 lines
517 B
C#
Executable File

using Microsoft.AspNetCore.Authorization;
namespace JXCMS.Core.Auth
{
public abstract class BaseAuthorizeAttribute : AuthorizeAttribute
{
public static string LoginPath = "/Admin/Login";
public static string AccessDeniedPath = "/Error/Forbidden";
public BaseAuthorizeAttribute()
{
AuthenticationSchemes = GetScheme();
}
public string GetScheme()
{
return GetType().Name.Replace("AuthorizeAttribute", "");
}
}
}