1
votes

I have an existing MVC project (purpose built customer portal) that I am integrating into Orchard CMS as a module.

The customer portal module has its own database containing user information, which I need to use for customer authentication.

However, I also want to retain Orchards user authentication for admin authentication to Orchard.

So essentially, I require two authentication schemes with two different login pages for this. One for customers and one for admins.

How could I implement this?

1

1 Answers

0
votes

One solution might be to cancel the idea of having 2 differnt login pages and moving your users to Orchards user table.

Then link these users to a specific role named like My existing MVC users and grant permissions to this role accordingly.

If you take this route some of the benefits would be

  • bound to Orchards user database and therefore existing authentication handling
  • existing permission stuff can be used / extended out of the box
  • user management in one place
  • extensible by using own parts (e.g. AddressPart, ContactPart, ...)

Another solution would be to replace the existing authentication by implementing IAuthenticationService. But this seems rather complex.