Passport Your website (on)
------- (Implement MS Passport on Your Website)
Small gas god 2001-11-12
Article Type: in-depth
Difficult Level: 4/9
Version: 1.01
Passport was earliest in 1999, which was just a login and authorization service to meet MS acquisition of Hotmail, silently. One year later, people began to know it, and truly attracting the controversy, an example of the user's use of the user's use of the user's use of MS, is considered to violate personal privacy and rights. In fact, MS Messenger began to be concerned, and the premise of using Messager is you You must have a mailmail or MSN's Mail account, this moment PASSPORT begins to show the head angle.
The MSN Explorer 6.0 is then officially Passport, and MS Messenger has also been continuously upgraded, and an angry is 4.0. MS began to push Passport in front desk, but it is difficult to put Passport and DotNet, WebService at that point. On July 13, 2001, MSN's Hotmail website updated, all the new, the beautiful web ui made people sighing, I began to lament China's Web Mail when it would be so beautiful. In fact, Passport 2.0 is also release before this, which is the most important upgrade of Passport. At the same time, people began to open their eyes in the psycho of DOTNET. In addition to Visual Studio.net, MS indicates that Passport will be the earliest implementation of DOTNET, and Passport has frequently appeared in major technical newspapers and magazines, Passport has been hanging on DOTNET Hook, but how to see Passport will be related to DOTNET, this MS has quietly expanded the Passport's Database several times, doing a variety of technical preparations.
After three months, XP is released, the PDC 2001 was held, and Visual Studio.Net Beta2 Release, WebService has flourished, everything suddenly clear, after 15 days, MSN Explorer 7.0 released, MSN main site ushered in for more than two years The big revision, starting to have a comment, it has changed, someone has snively smell a strange smell from MSN. This revision changed to the root, MSN Explorer claims to be true synchronization with the MSN website and becoming the most beautiful Client, MSN Messenger discovered Actions Plane, soon, Hailstorm was renamed Microsoft .NET My Services, Passport broke out of Hotmail, Messenger became a member of Microsoft .NET My Services, MS indicates that all Microsoft .NET My Services in the future is Passport, it Will be the only login method for all Web sites and WebService, and future it will be developed into a global e-commerce platform for authorization. Almost overnight, all related websites in the MS, PASSPORT WEBUI, EP logo also appeared on nearly 160 e-commerce websites. At this time, Passport users have more than 165,000,000.
Just n't I don, I also downloaded Passport SDK 2.0, I think it is very convenient to use, as a developer, implementing the PASSPORT of your website, just a few steps, and for the user, whether it is authorized or verified. Unparalleled familiarity and easy, they will like to complete a transaction or experience on a website, as if I have a single inconvenience, as a user, I have to have an MS. Passport account, if you can eliminate the protrusions, the privacy of my little bit is fill in the MS or Sun or any Web website is not too big; as a developer, I am bored that China The so-called network security implementation of the "network security application provider". Honestly, I can't directly reject these solutions and say loudly, and on the other hand, I am hard to convince you I like it. Ok, forgive me, I seem to be too far away. Let us get started:
1. Prepare our environment.
2. Implement a simple Passport
3. Switch and contact Microsoft® .NET My Services Manager.
Prepare the environment
My environment:
Windows 2000 Advanced Service SP2 EN
IIS 5 guarantees that there is a site to access.
Microsoft Passport SDK 2.0
MS Visual InterDev 6.0 or any ASP editor
NIC or MODEM must ensure that your machine can connect to the Internet.
Have a real Microsoft Passport, the best test @ msn.com
Microsoft Passport SDK 2.0 can be obtained from the URL below.
Http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/001/644/msdncompositeoc.xml&frame=true
NT4, IIS4 can use Microsoft Passport SDK 1.4
http://download.microsoft.com/download/iis50/install/ppsdk1_4/nt45/EN-US/PPM_SDK_V1-4-2.EXE
W2K, IIS5 is best to use Microsoft Passport SDK 2.0
http://download.microsoft.com/download/passport/install/2.0/nt5xp/en-us/ppm_sdk_v2.exe
You can then install SDK, then you need to create a Preproduction Environment (preP).
First go http://current-register.passporttest.com/default.asp to get a preP Passport, then you can go to http://current-login.passporttest.com/ Can see if you can log in. This Passport is not a real world. When you log in to a real-world website such as www.msn.com, then you are logged in to http://login.passport.com and actually log in in preP actually log in to http: //current-login.passporttest.com/ This is the address of the Prep Login Server. As for how you control your users direct switching in these two addresses will be set in the Passport Administration Utility, of course, if you know later, you can also modify them directly in the registry.
Then you need to check the IE or browser as your client, preferably IE5 or more, and set up using cookies and SSL in the option and support JavaScript. More specific you can see Microsoft Passport SDK 2.0 document:
Http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotNet/html/myservpassp.asp?frame=true
The entire setting and DOTNET environment can have no relationship, so there is no need for any DOTNET installation or related files.
You can start the Passport Administration Utility to see this below.
2. Implement a simple Passport
Simply realize a Passport, just use two to three functions ilyThenticated, Loginuser, Logotag2, fromnetworkServer, and more.
For example, Mypassport.asp:
<%
Dim OMGR, TIMEWINDOW, FORCELOGIN, RURL
Set Omgr = Server.createObject ("Passport.manager")
Thisurl = "http: //" & required.servervariables ("server_name") & _
Request.SerVariables ("script_name")
IF omgr.fromnetworkserver the
Response.Redirect (thisURL)
END IF
If omgr.hastic it 'Just doing basic auth; any Ticket IS ACCEPTED Regardless of Age
'Signout Uses a Different Site-Global URL, Assumes That this Url Exists ...
RURL = Server.urlencode ("http: //" & required.servervariables ("Server_name") & _
"/mypassport/loginout.asp")
Response.write ("Welcome, you are logged in!")
'Will Display Sign-Out Link.
Else 'NO Ticket, Tell Them To Click Sign in
RURL = Server.urlencode (thisURL)
Response.write ("Please login")
'Will Display Sign-in Link.
END IF
'None logged in to display the logo of SIGN IN, otherwise Sign Out's logo will be displayed.
Response.write (Omgr.Logotag2 ("www.ccboysvr.com"))
%>
The basic logic is first judged to be logged in, if the login is logged in and the login is displayed, otherwise the Sign Out button is displayed.
If omgr.isauthenticated ()
Show "Welcome" & Omgr.profile ("Nickname")
otherwise
Omgr.loginuser "Login successful return URL"
There will be involved in the SDK documentation:
Implementing .NET Passport Single Sign-in
(Implementation of commonly used login mode on website) Implementing Kids Passport
(Even little children have considered, but this greater than what browser content is better, you can target special customer bases, MS is really leading, considering thoughtful)
Express Purchase IMPLEMENTATION GUIDE
(EP has recently found a vulnerability, just after the shutdown, it is repairing, although China's national conditions are different, but the foreign EP has recently developed very good, China has joined the WTO, this is to speed up.)
.NET Passport Cobranding overview
(How to customize the company BRAND of the login interface when logging in, we will see some of the third point below)
In addition, Specific Implementation How-TOS must do not let go, can you understand that marking your depth of Passport (Personal view).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ppsdk21/implementation/passport_implementation.asp
End this section, I apologically understand the picture of Passport before this section, maybe you can better understand the Passport itself by the picture:
When a user requests a secured page from a site using Passport, the site redirects the user to a Passport server for authentication. Once the user has been authenticated, he or she is sent back to the calling site. All communications between the Passport site and Participating Sites Go Through The User's Browser, Using Encrypted Cookies and Query Strings.
(Photo Source www.vbpj.com Author: Jon Rauschenberger Email: jrausch@claritycon.com)
I feel that Microsoft Passport SDK 2.0 document is already very complete and detailed, all steps and details have written, if I write more, there is a suspicion of extracted (Haha), the only thing is not good, it is local installation SDK actually does not have this document, all documents and help must go to MSDN's website (how bad, don't you call the phone?)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ppsdk21/implementation/passport_implementation.asp
especially:
The above text and pictures involve other people's privacy and personal rights, such as non-authorized or agree, please do not publish, reprint, adapt, repost, or other forms of communication. All of the above texts and images are only used for internal communication, and do not make any news publishers and commercial purposes.