Use Owin.Security on multiple applications

153 Views Asked by At

I'm creating two web-applications using MVC 5. All of these applications will be hosted on one webserver.

I'm using the default Owin security. and want to use just one "security" database for all of the applications running on that server.

What i want to do is, create Users and User roles but these user roles are different in each application. Example: Application A has these User roles:

- Creator
- Reader
- Admin
- Editor

Application B has these User roles:

- Viewer
- Publisher
- Admin
- CanDelete

Now I want to give one user (eg "John Doe") different userroles within each application: Example:

User: "John Doe" --> Application A --> Creator + Editor
User: "John Doe" --> Application B --> Viewer

Any ideas how to accomplish this?

0

There are 0 best solutions below