summaryrefslogtreecommitdiffstats
path: root/samples/OpenIdWebRingSsoProvider/user.aspx.cs
blob: 8050367a6dbea46e603ffb142e94ffdb25809b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace OpenIdWebRingSsoProvider {
	using System;
	using DotNetOpenAuth.OpenId.Provider;
	using OpenIdWebRingSsoProvider.Code;

	/// <summary>
	/// This page is a required as part of the service discovery phase of the openid protocol (step 1).
	/// </summary>
	/// <remarks>
	/// <para>The XRDS (or Yadis) content is also rendered to provide the consumer with an alternative discovery mechanism. The Yadis protocol allows the consumer 
	/// to provide the user with a more flexible range of authentication mechanisms (which ever has been defined in xrds.aspx). See http://en.wikipedia.org/wiki/Yadis.</para>
	/// </remarks>
	public partial class User : System.Web.UI.Page {
		protected void Page_Load(object sender, EventArgs e) {
			this.usernameLabel.Text = Util.ExtractUserName(Page.Request.Url);
		}

		protected void IdentityEndpoint20_NormalizeUri(object sender, IdentityEndpointNormalizationEventArgs e) {
			string username = Util.ExtractUserName(Page.Request.Url);
			e.NormalizedIdentifier = new Uri(Util.BuildIdentityUrl(username));
		}
	}
}