summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/OpenIdOfflineProvider/MainWindow.xaml.cs1
-rw-r--r--samples/OpenIdProviderMvc/Web.config4
-rw-r--r--samples/OpenIdProviderWebForms/Web.config1
-rw-r--r--samples/OpenIdRelyingPartyClassicAsp/login.asp22
-rw-r--r--samples/OpenIdRelyingPartyMvc/Web.config4
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Web.config3
-rw-r--r--samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx4
7 files changed, 35 insertions, 4 deletions
diff --git a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
index a0ee56e..f4f88ca 100644
--- a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
+++ b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs
@@ -101,6 +101,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider {
IRequest request = this.hostedProvider.Provider.GetRequest(requestInfo);
if (request == null) {
App.Logger.Error("A request came in that did not carry an OpenID message.");
+ response.ContentType = "text/html";
response.StatusCode = (int)HttpStatusCode.BadRequest;
using (StreamWriter sw = new StreamWriter(response.OutputStream)) {
sw.WriteLine("<html><body>This is an OpenID Provider endpoint.</body></html>");
diff --git a/samples/OpenIdProviderMvc/Web.config b/samples/OpenIdProviderMvc/Web.config
index fb89415..6f0fdd1 100644
--- a/samples/OpenIdProviderMvc/Web.config
+++ b/samples/OpenIdProviderMvc/Web.config
@@ -194,4 +194,8 @@
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</handlers>
</system.webServer>
+
+ <runtime>
+ <legacyHMACWarning enabled="0" />
+ </runtime>
</configuration>
diff --git a/samples/OpenIdProviderWebForms/Web.config b/samples/OpenIdProviderWebForms/Web.config
index c3c7ef9..66cf12a 100644
--- a/samples/OpenIdProviderWebForms/Web.config
+++ b/samples/OpenIdProviderWebForms/Web.config
@@ -183,6 +183,7 @@
</handlers>
</system.webServer>
<runtime>
+ <legacyHMACWarning enabled="0" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
diff --git a/samples/OpenIdRelyingPartyClassicAsp/login.asp b/samples/OpenIdRelyingPartyClassicAsp/login.asp
index 878ab39..d222e57 100644
--- a/samples/OpenIdRelyingPartyClassicAsp/login.asp
+++ b/samples/OpenIdRelyingPartyClassicAsp/login.asp
@@ -17,23 +17,37 @@
thisPageUrl = "http://" + Request.ServerVariables("HTTP_HOST") + Request.ServerVariables("URL")
requestUrl = "http://" + Request.ServerVariables("HTTP_HOST") + Request.ServerVariables("HTTP_URL")
Set dnoi = server.CreateObject("DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty")
+ On Error Resume Next
Set authentication = dnoi.ProcessAuthentication(requestUrl, Request.Form)
+ If Err.number <> 0 Then
+ Response.Write "<p>" + Server.HTMLEncode(Err.Description) + "</p>"
+ End If
+ On Error Goto 0
if Not authentication Is Nothing then
If authentication.Successful Then
Session("ClaimedIdentifier") = authentication.ClaimedIdentifier
- Session("Email") = authentication.ClaimsResponse.Email
- Session("Nickname") = authentication.ClaimsResponse.Nickname
- Session("FullName") = authentication.ClaimsResponse.FullName
+ If Not authentication.ClaimsResponse Is Nothing Then
+ Session("Email") = authentication.ClaimsResponse.Email
+ Session("Nickname") = authentication.ClaimsResponse.Nickname
+ Session("FullName") = authentication.ClaimsResponse.FullName
+ End If
Response.Redirect "MembersOnly.asp"
else
Response.Write "Authentication failed: " + authentication.ExceptionMessage
end if
elseif Request.Form("openid_identifier") <> "" then
dim redirectUrl
+ On Error Resume Next
' redirectUrl = dnoi.CreateRequest(Request.Form("openid_identifier"), realm, thisPageUrl)
redirectUrl = dnoi.CreateRequestWithSimpleRegistration(Request.Form("openid_identifier"), realm, thisPageUrl, "nickname,email", "fullname")
- Response.Redirect redirectUrl
+ If Err.number <> 0 Then
+ Response.Write "<p>" + Server.HTMLEncode(Err.Description) + "</p>"
+ Else
+ Response.Redirect redirectUrl
+ End If
+ On Error Goto 0
End If
+
%>
<form action="login.asp" method="post">
OpenID Login:
diff --git a/samples/OpenIdRelyingPartyMvc/Web.config b/samples/OpenIdRelyingPartyMvc/Web.config
index c4a4b71..c3bfa41 100644
--- a/samples/OpenIdRelyingPartyMvc/Web.config
+++ b/samples/OpenIdRelyingPartyMvc/Web.config
@@ -172,4 +172,8 @@
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
</system.webServer>
+
+ <runtime>
+ <legacyHMACWarning enabled="0" />
+ </runtime>
</configuration>
diff --git a/samples/OpenIdRelyingPartyWebForms/Web.config b/samples/OpenIdRelyingPartyWebForms/Web.config
index 0ae3c6c..20ac864 100644
--- a/samples/OpenIdRelyingPartyWebForms/Web.config
+++ b/samples/OpenIdRelyingPartyWebForms/Web.config
@@ -102,4 +102,7 @@
</logger>
</log4net>
+ <runtime>
+ <legacyHMACWarning enabled="0" />
+ </runtime>
</configuration>
diff --git a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx
index df29914..232cf3f 100644
--- a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx
+++ b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx
@@ -3,6 +3,10 @@
<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="openid" %>
<asp:Content runat="server" ContentPlaceHolderID="head">
+<script>
+// window.openid_visible_iframe = true; // causes the hidden iframe to show up
+// window.openid_trace = true; // causes lots of messages
+</script>
<style type="text/css">
.textbox
{