Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Authenticate user in SharePoint in code

$
0
0

Hi,

I have a SharePoint 2013 portal, which is using custom claims provider(derived from SPClaimProvider) to authenticate a user through a custom login page.

here is the  web.config settings.

<membership defaultProvider="i"><providers><add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /><add connectionStringName="MyConnectionString" connectionUsername="CN=xx,CN=xx,CN=xxs,DC=xx,DC=xx" connectionPassword="xxx"
         connectionProtection="None" applicationName="/Portals" requiresUniqueEmail="false"
         passwordAttemptWindow="10" enablePasswordReset="true" requiresQuestionAndAnswer="true"
         minRequiredNonalphanumericCharacters="0"
         enableSearchMethods="true" name="MyMembershipProvider"
         type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></providers></membership>

Now, we have a requirement where we'd need to implement an auto sign functionality where:

1. we'd get a valid user id in the url as querystring(without password).

2. we'd need to read the querystring and generate an authentication token and let him login to the SharePoint portal.

Is there anyway of achieving the same? Any help/suggestions would be appreciated.

Regards,

Vishal


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>