summaryrefslogtreecommitdiffstats
path: root/samples/ProviderPortal/server.aspx.cs
diff options
context:
space:
mode:
Diffstat (limited to 'samples/ProviderPortal/server.aspx.cs')
-rw-r--r--samples/ProviderPortal/server.aspx.cs20
1 files changed, 1 insertions, 19 deletions
diff --git a/samples/ProviderPortal/server.aspx.cs b/samples/ProviderPortal/server.aspx.cs
index 8589f40..fbc9a6c 100644
--- a/samples/ProviderPortal/server.aspx.cs
+++ b/samples/ProviderPortal/server.aspx.cs
@@ -10,24 +10,6 @@ public partial class server : System.Web.UI.Page {
serverEndpointUrl.Text = Request.Url.ToString();
}
protected void provider_AuthenticationChallenge(object sender, AuthenticationChallengeEventArgs e) {
- var idrequest = e.Request;
- if (idrequest.Immediate) {
- if (idrequest.IsDirectedIdentity) {
- if (User.Identity.IsAuthenticated) {
- idrequest.LocalIdentifier = Util.BuildIdentityUrl();
- idrequest.IsAuthenticated = true;
- } else {
- idrequest.IsAuthenticated = false;
- }
- } else {
- string userOwningOpenIdUrl = Util.ExtractUserName(idrequest.LocalIdentifier);
- // NOTE: in a production provider site, you may want to only
- // respond affirmatively if the user has already authorized this consumer
- // to know the answer.
- idrequest.IsAuthenticated = userOwningOpenIdUrl == User.Identity.Name;
- }
- } else {
- Response.Redirect("~/decide.aspx", true); // This ends processing on this page.
- }
+ Util.ProcessAuthenticationChallenge(e.Request);
}
} \ No newline at end of file