Base solution for your next web application
Open Closed

[AbpAuthorize] vs [AbpMvcAuthorize] #11928


User avatar
0
Astech created

Is there any reason why we could not consolidate there attributes and just have one for system wide authorization? Or is it necessary to use a different one in the MVC project to the application service?

Thanks

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Astech,

    AbpMvcAuthorize inherits from AuthorizeAttribute which is defined in Microsoft.AspNetCore.Authorizatio. Becasue of this, it can be used in web layer.

    AbpAuthorize can be used in application layer.

    We could merge these two attributes but in that case, we can't use ASP.NET Core's AuthorizeAttribute.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)