0

What are the necessary configurations to do role-based authorization over api using abp. I can't find any source on this, the documentation is very poor

I tried the configurations made in a normal web api project related to jwt, but things are a little different in abp.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

1

I do not believe that ABP has a shortage of documents on this issue. You can use it as follows:

[Authorize(Roles = "admin")]

ABP uses policy-based as you know. Again, as you know, policy-based authorization underneath the covers, role-based authorization and claims-based authorization use a requirement, a requirement handler, and a preconfigured policy. These building blocks support the expression of authorization evaluations in code. The result is a richer, reusable, testable authorization structure.

Also see: https://stackoverflow.com/a/58465136/9922629

berkansasmaz
  • 608
  • 5
  • 16