Custom Authentication against 3rd party library

Posted by david.ondracek@bayoo.net on 24-Sep-2018 01:19

Hi,

I have an actually pretty simple task but I am having a really hard time to achieve it:

We have a library providing basically all membership- and profile-related data and action and exposing those via defined interfaces and models.

For example there's a GetUser(id) method, a Login(username, password) method, ResetPassword etc. etc.

So technically all I would need to do is just to write a wrapper to be used by sitefinity which will proxy the authentication and profile related calls to the library.

Unfortunately, this "just" is getting bigger and bigger the more I try to figure out the "right" way. First I've tried to implement a custom MembershipDataProvider (like here: https://www.progress.com/documentation/sitefinity-cms/custom-membership-provider-full-code), but when it came to GetUsers() I had to let it go, because although there IS the possibility to create a IQueryable, I cannot Select the Model.User objects from my entities bcs the UserName property is read-only and calling the setUserName method in the initializer will cause an enumeration of the IQueryable. Btw we have about 150k of users in the database so working on a List instead of IQueryable is not an option.

Afterwards I did a lot of retries but with minor success... Any Ideas how I could achieve what I need? the Requirements are pretty simple:

  • the library to be used for frontend users only
  • all library users will have the same role (eCommerce Customer) with no access to the backend
  • no copy of the customer data to sitefinity db (legal req.)
  • authentication and profile methods wrapped for the library calls

Please help :)

All Replies

This thread is closed