Single Sign-on to SharePoint 2010 systems from other systemsCategory: sharepoint2010 2014-03-18 16:28 68 people read Comments (0) favorite reports
Ext.: Http://www.tuicool.com/articles/i22Ibu
All you did was use SharePoint Single Sign-on to log in to other systems with SharePoint, and now in turn, sign in to SharePoint with a form-certified system.
As we all know, SharePoint uses a domain authentication system, and the user must have a domain account to log on to the SharePoint system. But this domain account is not the same as other accounts. It is not possible to obtain the password. This also creates difficulties with the integration of other systems and SharePoint systems.
Most of us will use the SharePoint system as the primary system, even if there are other systems that are used to log on to other systems from the SharePoint system. This is easy to do by logging on to other systems in the SharePoint system. Because most of the other system user name and password can be obtained, so it is easier to implement.
And from other systems to sign in to the SharePoint system, relatively speaking, there are some difficulties, the main reason is that the domain account is difficult to get. This is not consistent with other systems.
But here you can use AJAX technology, it is very clever to implement this function, and very easy.
The first step is to add a jquery-1.4.1.js reference to the login page. Because the AJAX technology used this time comes from jquery. or stick to the code:
<ScriptSrc="Scripts/jquery-1.4.1.js"Type="Text/javascript" ></Script><ScriptType="Text/javascript" > functionInitajax() {var ajax =Falsetry {ajax =New ActiveXObject ("Msxml2.xmlhttp"); }catch (e) {try {ajax =New ActiveXObject ("Microsoft.XMLHTTP"); }catch (E) {ajax =False } }if (!ajax &&typeof XMLHttpRequest! =' undefined ') {ajax =new xmlhttprequest ();} return ajax;} function login () {try {var strName = ' domain name \ \ user name '; var strpwd = ' password '; var location = ' SharePoint site address '; var ajax = new initajax (); Ajax.open ( "POST", Location, false, StrName, strpwd); Ajax.send (); if (ajax.status = 200) {window.location.href = location;}} catch (e) {}}</SCRIPT>
Once the above script code is complete, you can log in using a button:
<input type= "button" value= "Login" onclick= "login ()"/>
Single Sign-on to SharePoint 2010 systems from other systems