Skip to content

helitonjr/CouplingExtendedMembership

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Coupling - ExtendedMembershipProvider

An example to demonstrate using the ASP.Net MVC 4 ExtendedMembershipProvider with a DDD membership account model data management and RavenDB storage. The aim was the decouple the storage engine from the main application and Membership Provider.
Allows Standard local membership and social membership sign in. Also includes a simple roles provider for authorisation.

Its a bit rough and ready at the moment, much is missing but most of the basic concepts are included providing a base to extend further.


The design makes it easy enough now to plug in a different storage engine, e.g. MySQL or even an API and to switch out the ExtendedMembershipProvider in favour of different authentication method such as using Claims framework

Configuration
Modify the web.config of the web application to inlcude the following sections.
The key property to modify is the connectionString to ensure points to your instance of RaveDB.

<configuration>
  <connectionStrings>
    <add name="CouplingDataStore" connectionString="URL=http://localhost:8080;Database=Coupling" />
  </connectionStrings>

  <system.web>
    <membership defaultProvider="CouplingMembershipProvider" userIsOnlineTimeWindow="20">
      <providers>
        <clear />
        <add name="CouplingMembershipProvider" type="Coupling.Web.ApplicationServices.Memberships.CouplingExtendedMembershipProvider, Coupling.Web.ApplicationServices, Version=1.0.0.0, Culture=neutral" connectionStringName="CouplingDataStore"
             applicationName="Coupling" requiresQuestionAndAnswer="false" enablePasswordReset="true" enablePasswordRetrieval="false" />
      </providers>
    </membership>
  </system.web>
</configuration>

Web Application Integration
To integration into your own web application see the sample Coupling.Web package.
Add a reference to the Coupling.Web.ApplicationServices package and include Structuremap which has been used for Dependency Injection. Each package contains a DepenencyResolution folder with a registry for injectable components.

About

Example to demonstrate using ASP.Net MVC 4 ExtendedMembershipProvider with a DDD membership account model data management and RavenDB storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 91.9%
  • CSS 7.8%
  • Other 0.3%