Custom membership provider for cross-domain authentication - General Discussions - General Discussions - Progress Community
 General Discussions

Custom membership provider for cross-domain authentication

  • Custom membership provider for cross-domain authentication
  • 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.

  • 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
  • Hi Daniel,

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

    - Denis.
  • 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