Authentication is an integral part of every web application. A number of ways exist in SharePoint to provide authentication support to your websites. SharePoint by default has the feature of mixed mode authentication, that means you can use ASP.NET membership provider and Windows accounts from active directory to authenticate your users but they have to select first there users type and SharePoint automatically will redirect the user to the suitable login page. In case that we have an extranet environment and we need one login page i called it "Silent Login" for all of the membership providers that we have. The aim of this project is to create a custom membership provider to allow users to login to there portal from one login page whether its custom SQLDB or the current Active Directory.

In this project you will find that we have three class libraries:
  • BaseClass.cs, this class is responsible of directing the user to the suitable authentication provider SQL or LDAP. And this class will be used as our main membership provider in Web.Config files (in the deployment steps I will talk In details about this).
new-sharepoint-2013-analytics-1.png
  • Members.cs, this class will serve as SQL membership provider and it will use two other classes to get the users from SQL DB (MemberShipProviderData.cs, SqlHelper.cs) inside SqlHelper class you find our connection string.
new-sharepoint-2013-analytics-2.png
  • LDAPMember.cs, this class will be called in case the user does not exist in the SQL DB, this membership will talk with the active directory in the current environment to check wiether the user is exist or not.
new-sharepoint-2013-analytics-3.png

Also we have the following Web Parts:
  • Custom login form and logout button
LoginPage.png
  • Change Password form
ChangePassword.JPG
  • FBA Claims Viewer
FBAClaimsViewer.JPG

Last edited Jun 17, 2013 at 3:50 PM by eyadwan, version 3