Windows LiveID op het blog

Het is me gelukt om nu ook een membership provider te implementeren waardoor er nu eindelijk weer gebruikers op het weblog in kunnen loggen. Hier heb ik wel wat hulp bij gehad van de Sharepoint Community Kit die op Codeplex is te vinden. Vanaf heden is het mogelijk om met een Windows Live ID in te loggen op dit weblog. Op zich mooi, maar wat heb ik er voor moeten doen, nou dat is eigenlijk heel eenvoudig.

Na wat zoeken en proberen kwam ik uiteindelijk uit op een CKS:WLA project bij Codeplex (https://cks.codeplex.com/releases/view/7746) Eigenlijk heb ik eerst het WLA project van deze site geimplementeerd: https://blog.solanite.com/keith/WLA/Documentation/Home.aspx. Omdat ik hier wat problemen mee had was ik op zoek naar enkele oplossingen. Uiteindelijk kwam ik dus bij het CKS project.

De sentatie is wel hetzelfde gebleven, echter zijn er enkele bugs in opgelost die nog wel in de ‘oude’ versie zaten. De readme bij het project is ook behoorlijk duidelijk en eigenlijk ook een kopie van de oude site. Ik kopieer het hier even, zodat de informatie ook geborgd is, mochten ze besluiten het project off-line te halen.

Download the SharePoint Solution

The first step of the installation is to download the WSP solution file. You can download the current version here.

Deploy the SharePoint Solution

In order to deploy the solution you need to make sure the WSP file is on the SharePoint server file system. Then you should:

  • Open a command prompt
  • Change directory in to the directory you have downloaded the WLA.wsp file
  • Type: "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addsolution -filename WLA.wsp
  • Type: "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -odeploysolution -name WLA.wsp -immediate -allowgacdeployment
  • Type: "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -oexecadmsvcjobs This will install:
  • C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\liveinfo.aspx
  • C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\liveauth-handler.aspx
  • C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG\stsadmcommands.addwindowsliveauth.xml
  • GAC: WindowsLiveAuth.dll These files will be installed on all servers in the farm.

Register a Windows Live ID Application

Once the solution is installed you must make sure that you have registered your application with live.com. Doing this will give you an Application ID and a secret key that you will use to identify your users to live.com and authenticate the response that will determine if the user is valid.

  • Login to https://msm.live.com/app/default.aspx
  • Click on the Register an Application link
  • The Application Name is a name you will use to identify your application
  • The Return URL must be set tohttps://your.servername.com/_layouts/liveauth-handler.aspx
  • The Secret Key is the “password” that will be used to sign the authentication responses (this is the AppKey you will need later)
  • Submit the registration
  • Click on the Manage My Applications link Using the Manage My Applications page you should remember the Application ID (this is the AppId you will need later) along with the Secret Key you used when registering the application.

Configure the Authentication Provider

Once you have the provider installed and the application registered you need to configure the system to use this information. A new STSADM command has been added to help with this process. To complete the configuration you must:

  • Go to the Central Administration home page
  • Click on the Application Management tab
  • Click on the Authentication providers link in the Application Security section
  • Use the Web Application drop down to ensure that the correct web application is selected
  • In the Zones list pick the zone you want to enable Live ID Authentication on (Default is probably going to be what you are looking for)
  • Select the Authentication Type of Forms
  • Enter a Membership provider name of LiveID
  • Enter a Role manager name of LiveRoles
  • Click the Save button

This has configured SharePoint to use the new Membership and Role providers, however there is one more configuration steps to configure the web applications to recognize the new providers. You must:

  • Open a command prompt
  • Type: "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe" -o addwindowsliveauth -appid [appid]
  • Perform an IISRESET and you are done

Note: As a best practice you will want to have the profsite parameter set to a site that has restricted access as it will allow contributors to lock users. Note: As a best practice the locked parameter should be a URL that has anonymous access and ideally has contact information about how to become unlocked. Note: Live ID users will need to have the Edit Personal User Informationpermission added to whatever role they have on the site to have access to change their personal information.

Het registreren van een Windows Live ID applicatie blijkt ook eenvoudig te zijn. Tegenwoordig lijkt het gecombineerd te zijn met de Azure Services, zoals hieronder is te zien:

Hier krijg je enkele belangrijke gegevens.
Door nu verder de readme te volgen kun je eigenlijk in 1x het project succesvol implementeren.

Ook kun je nu in de site collectie, waar de WLA is geinstalleerd, de groep Authenticated Live Users gebruiken, wat eigenlijk hetzelfde is als NT_AUTHORITY\Authenticated Users. Handig!

Hopelijk blijkt het een en ander ook stabiel te zijn, dat is nog afwachten natuurlijk.

Wat wel nuttig is om te vermelden is dat gebruikers na het registreren van het account op de site, ze nog wel zelf de gebruikersnaam moeten aanpassen.

Dit kan eenvoudig door op de naam te klikken en dan voor My Settings te kiezen

In het vervolgscherm is een Edit item link te zien waar op gedrukt kan worden om de profiel informatie te wijzigen:


Share

comments powered by Disqus