summaryrefslogtreecommitdiffstats
path: root/src/OpenID/OpenIdWebRingSsoProvider/Default.aspx.cs
blob: d7e53100c9c52582e37f2474ce35a0024370cdc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace OpenIdWebRingSsoProvider {
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Web;
	using System.Web.UI;
	using System.Web.UI.WebControls;
	using DotNetOpenAuth.OpenId.Provider;
	using OpenIdWebRingSsoProvider.Code;

	public partial class _Default : System.Web.UI.Page {
		protected void Page_Load(object sender, EventArgs e) {
			// The user may have just completed a login.  If they're logged in, see if we can complete the OpenID login.
			if (User.Identity.IsAuthenticated && ProviderEndpoint.PendingAuthenticationRequest != null) {
				Util.ProcessAuthenticationChallenge(ProviderEndpoint.PendingAuthenticationRequest);
				if (ProviderEndpoint.PendingAuthenticationRequest.IsAuthenticated.HasValue) {
					ProviderEndpoint.SendResponse();
				}
			}
		}
	}
}