Custom membership provider for cross-domain authentication

Posted by Community Admin on 03-Aug-2018 11:50

Custom membership provider for cross-domain authentication

All Replies

Posted by Community Admin on 17-Jan-2013 00:00

Hi guys. I'm trying to implement SSO for two sites at once, one of them is based on sitefinity CMS (other, obviously, dont). My approach is to develop my own membership provider, which allow me to grand access for users from other web-site to sitefinity. 

The main problem is that I can't register or affect on the actual authentication in sitefinity by my own membership provider. Please, can you discribe step by step, what should I do, to get things work, like how should I implement my membership provider and attach it to sitefinity?

Also, do you have any documentation for developers, which will describe this type of solution in depth? I will appreciate if you give me some links to read.

Posted by Community Admin on 21-Jan-2013 00:00

Hi Artem,

I did this once, and I've implemented my own membership provider by inheriting from the 'MembershipDataProvider' class.

public class CustomMembershipProvider : MembershipDataProvider

Next I registered it like this:

SecurityConfig.config
<membershipProviders>
        <add title="Custom Membershipprovider" type="SitefinityWebApp.Providers.CustomMembershipProvider" applicationName="Membership/" enablePasswordReset="true" maxInvalidPasswordAttempts="5" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="7" newPasswordLength="8" passwordAttemptWindow="10" passwordFormat="Encrypted" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" enablePasswordRetrieval="false" enabled="True" name="WecMembershipProvider" />
    </membershipProviders>

That would enable me to login from the public site using the custom membership provider.
Of course you can extend this to your needs. Maybe add a custom RoleProvider also.

Regards,
Daniel

Posted by Community Admin on 01-Feb-2013 00:00

Hi Daniel,

Did you add second data connection string in your configurations as well? So your custom provider can connect to another database?

- Denis.

Posted by Community Admin on 04-Feb-2013 00:00

Hi Denis,

 No, in this case I didn't. My MembershipProvider was getting it's data out of one of the Dynamic Modules within Sitefinity. But of course you can use a different connection string.

Regards,
Daniel

This thread is closed