casbin-auth (RBAC) over a naive implementation ? right now i'm sending a string to each handler and simply compare it to users role
If it feels too naive then you can use Okta
sorry but this isn't really an answer to my question, okta is just another library like casbin(probably except that casbin is just authorization , not authentication), my question is why would i want to use an authorization library ?
Your application might be used by various roles such as admin, super admin, customer, boss etc. Customer shouldn't be able to use apis of admins. To provide this you need to come up with role based authorization. In that case libraries like casbin, okta can help you. If you don't want to use any of them, you can create your own role checker
thanks again, but still not the answer, i know what role based access control is and why it is used. let me give an example on what i want to know , so instead of authorization , let's say authentication , i can surely implement authentication myself, but sometimes there are some tricky points that i might miss , for example storing password in plain text in database, just a silly example, it's possible that authentication libraries would take care of that now , what problems can a authorization library solve compared to just comparing user role with a string ?
Обсуждают сегодня