Answer the question
In order to leave comments, you need to log in
How to coordinate IAuthenticationFilter work in asp.net mvc?
For the project, I made 3 filters IAuthenticationFilter
BasicAuthorizeAttribute - checks for roles based on aspnet identity
RoomMemberAuthorizeAttribute - checks for membership in the room (according to its own database)
RoomAdminAuthorizeAttribute - checks for membership in the admin group in the contan,
each separately checks separately, but if specify them in one method, for example
[RoomMemberAuthorize]
[BasicAuthorize(Roles = "Admin")]
public ActionResult Details(int? id)
Answer the question
In order to leave comments, you need to log in
First rule: you don't need to make your own [Authorize] implementation. you better not do it, it wakes up full of holes. Why make your own? what did not suit the standard?
[Authorize(Roles = "Administrator, User")]
[Authorize(Users= "User1, User2")]
There is also an Order property that sets the execution order.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question