summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-10-24 15:56:48 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-10-24 15:56:48 -0700
commit9dbb9aab73812202648c4e68d60261dd84d6c8e2 (patch)
tree5de139019a7b2f870f84c57cac36c0e489bd1e41 /samples
parent4b27c330fbfb3a260aa3bd6a9b1232ee3b53deb0 (diff)
parente7ce41355c38b3125729a62920231f274b7a2100 (diff)
downloadDotNetOpenAuth-origin/mono2.zip
DotNetOpenAuth-origin/mono2.tar.gz
DotNetOpenAuth-origin/mono2.tar.bz2
Merge branch 'v3.2' into mono2origin/mono2
Conflicts: src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
Diffstat (limited to 'samples')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/Util.cs185
-rw-r--r--samples/InfoCardRelyingParty/Site.Master4
-rw-r--r--samples/OAuthConsumer/Twitter.aspx.cs2
-rw-r--r--samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj12
-rw-r--r--samples/OpenIdOfflineProvider/Properties/AssemblyInfo.cs15
-rw-r--r--samples/OpenIdProviderMvc/Views/Shared/Site.Master4
-rw-r--r--samples/OpenIdProviderMvc/Views/Shared/Xrds.aspx8
-rw-r--r--samples/OpenIdProviderWebForms/ProfileFields.ascx.cs18
-rw-r--r--samples/OpenIdProviderWebForms/Site.Master4
-rw-r--r--samples/OpenIdProviderWebForms/Web.config4
-rw-r--r--samples/OpenIdProviderWebForms/server.aspx2
-rw-r--r--samples/OpenIdRelyingPartyClassicAsp/MembersOnly.asp2
-rw-r--r--samples/OpenIdRelyingPartyClassicAsp/default.asp2
-rw-r--r--samples/OpenIdRelyingPartyClassicAsp/login.asp2
-rw-r--r--samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs4
-rw-r--r--samples/OpenIdRelyingPartyMvc/Views/Home/Index.aspx2
-rw-r--r--samples/OpenIdRelyingPartyMvc/Views/Shared/Site.Master6
-rw-r--r--samples/OpenIdRelyingPartyMvc/Views/User/LoginPopup.aspx16
-rw-r--r--samples/OpenIdRelyingPartyMvc/Web.config2
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Site.Master4
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Web.config2
-rw-r--r--samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs2
-rw-r--r--samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx1
-rw-r--r--samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs11
-rw-r--r--samples/README.html12
25 files changed, 246 insertions, 80 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Util.cs b/samples/DotNetOpenAuth.ApplicationBlock/Util.cs
index ea7da97..65505b6 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/Util.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/Util.cs
@@ -1,10 +1,44 @@
namespace DotNetOpenAuth.ApplicationBlock {
using System;
using System.Collections.Generic;
+ using System.Diagnostics;
using System.IO;
+ using System.Net;
using DotNetOpenAuth.Messaging;
- internal static class Util {
+ public static class Util {
+ /// <summary>
+ /// Pseudo-random data generator.
+ /// </summary>
+ internal static readonly Random NonCryptoRandomDataGenerator = new Random();
+
+ /// <summary>
+ /// Sets the channel's outgoing HTTP requests to use default network credentials.
+ /// </summary>
+ /// <param name="channel">The channel to modify.</param>
+ public static void UseDefaultNetworkCredentialsOnOutgoingHttpRequests(this Channel channel)
+ {
+ Debug.Assert(!(channel.WebRequestHandler is WrappingWebRequestHandler), "Wrapping an already wrapped web request handler. This is legal, but highly suspect of a bug as you don't want to wrap the same channel repeatedly to apply the same effect.");
+ AddOutgoingHttpRequestTransform(channel, http => http.Credentials = CredentialCache.DefaultNetworkCredentials);
+ }
+
+ /// <summary>
+ /// Adds some action to any outgoing HTTP request on this channel.
+ /// </summary>
+ /// <param name="channel">The channel's whose outgoing HTTP requests should be modified.</param>
+ /// <param name="action">The action to perform on outgoing HTTP requests.</param>
+ internal static void AddOutgoingHttpRequestTransform(this Channel channel, Action<HttpWebRequest> action) {
+ if (channel == null) {
+ throw new ArgumentNullException("channel");
+ }
+
+ if (action == null) {
+ throw new ArgumentNullException("action");
+ }
+
+ channel.WebRequestHandler = new WrappingWebRequestHandler(channel.WebRequestHandler, action);
+ }
+
/// <summary>
/// Enumerates through the individual set bits in a flag enum.
/// </summary>
@@ -72,5 +106,154 @@
return totalCopiedBytes;
}
+
+ /// <summary>
+ /// Wraps some instance of a web request handler in order to perform some extra operation on all
+ /// outgoing HTTP requests.
+ /// </summary>
+ private class WrappingWebRequestHandler : IDirectWebRequestHandler
+ {
+ /// <summary>
+ /// The handler being wrapped.
+ /// </summary>
+ private readonly IDirectWebRequestHandler wrappedHandler;
+
+ /// <summary>
+ /// The action to perform on outgoing HTTP requests.
+ /// </summary>
+ private readonly Action<HttpWebRequest> action;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="WrappingWebRequestHandler"/> class.
+ /// </summary>
+ /// <param name="wrappedHandler">The HTTP handler to wrap.</param>
+ /// <param name="action">The action to perform on outgoing HTTP requests.</param>
+ internal WrappingWebRequestHandler(IDirectWebRequestHandler wrappedHandler, Action<HttpWebRequest> action)
+ {
+ if (wrappedHandler == null) {
+ throw new ArgumentNullException("wrappedHandler");
+ }
+
+ if (action == null) {
+ throw new ArgumentNullException("action");
+ }
+
+ this.wrappedHandler = wrappedHandler;
+ this.action = action;
+ }
+
+ #region Implementation of IDirectWebRequestHandler
+
+ /// <summary>
+ /// Determines whether this instance can support the specified options.
+ /// </summary>
+ /// <param name="options">The set of options that might be given in a subsequent web request.</param>
+ /// <returns>
+ /// <c>true</c> if this instance can support the specified options; otherwise, <c>false</c>.
+ /// </returns>
+ public bool CanSupport(DirectWebRequestOptions options)
+ {
+ return this.wrappedHandler.CanSupport(options);
+ }
+
+ /// <summary>
+ /// Prepares an <see cref="HttpWebRequest"/> that contains an POST entity for sending the entity.
+ /// </summary>
+ /// <param name="request">The <see cref="HttpWebRequest"/> that should contain the entity.</param>
+ /// <returns>
+ /// The stream the caller should write out the entity data to.
+ /// </returns>
+ /// <exception cref="ProtocolException">Thrown for any network error.</exception>
+ /// <remarks>
+ /// <para>The caller should have set the <see cref="HttpWebRequest.ContentLength"/>
+ /// and any other appropriate properties <i>before</i> calling this method.
+ /// Callers <i>must</i> close and dispose of the request stream when they are done
+ /// writing to it to avoid taking up the connection too long and causing long waits on
+ /// subsequent requests.</para>
+ /// <para>Implementations should catch <see cref="WebException"/> and wrap it in a
+ /// <see cref="ProtocolException"/> to abstract away the transport and provide
+ /// a single exception type for hosts to catch.</para>
+ /// </remarks>
+ public Stream GetRequestStream(HttpWebRequest request)
+ {
+ this.action(request);
+ return wrappedHandler.GetRequestStream(request);
+ }
+
+ /// <summary>
+ /// Prepares an <see cref="HttpWebRequest"/> that contains an POST entity for sending the entity.
+ /// </summary>
+ /// <param name="request">The <see cref="HttpWebRequest"/> that should contain the entity.</param>
+ /// <param name="options">The options to apply to this web request.</param>
+ /// <returns>
+ /// The stream the caller should write out the entity data to.
+ /// </returns>
+ /// <exception cref="ProtocolException">Thrown for any network error.</exception>
+ /// <remarks>
+ /// <para>The caller should have set the <see cref="HttpWebRequest.ContentLength"/>
+ /// and any other appropriate properties <i>before</i> calling this method.
+ /// Callers <i>must</i> close and dispose of the request stream when they are done
+ /// writing to it to avoid taking up the connection too long and causing long waits on
+ /// subsequent requests.</para>
+ /// <para>Implementations should catch <see cref="WebException"/> and wrap it in a
+ /// <see cref="ProtocolException"/> to abstract away the transport and provide
+ /// a single exception type for hosts to catch.</para>
+ /// </remarks>
+ public Stream GetRequestStream(HttpWebRequest request, DirectWebRequestOptions options)
+ {
+ this.action(request);
+ return wrappedHandler.GetRequestStream(request, options);
+ }
+
+ /// <summary>
+ /// Processes an <see cref="HttpWebRequest"/> and converts the
+ /// <see cref="HttpWebResponse"/> to a <see cref="IncomingWebResponse"/> instance.
+ /// </summary>
+ /// <param name="request">The <see cref="HttpWebRequest"/> to handle.</param>
+ /// <returns>An instance of <see cref="IncomingWebResponse"/> describing the response.</returns>
+ /// <exception cref="ProtocolException">Thrown for any network error.</exception>
+ /// <remarks>
+ /// <para>Implementations should catch <see cref="WebException"/> and wrap it in a
+ /// <see cref="ProtocolException"/> to abstract away the transport and provide
+ /// a single exception type for hosts to catch. The <see cref="WebException.Response"/>
+ /// value, if set, should be Closed before throwing.</para>
+ /// </remarks>
+ public IncomingWebResponse GetResponse(HttpWebRequest request)
+ {
+ // If the request has an entity, the action would have already been processed in GetRequestStream.
+ if (request.Method == "GET")
+ {
+ this.action(request);
+ }
+
+ return wrappedHandler.GetResponse(request);
+ }
+
+ /// <summary>
+ /// Processes an <see cref="HttpWebRequest"/> and converts the
+ /// <see cref="HttpWebResponse"/> to a <see cref="IncomingWebResponse"/> instance.
+ /// </summary>
+ /// <param name="request">The <see cref="HttpWebRequest"/> to handle.</param>
+ /// <param name="options">The options to apply to this web request.</param>
+ /// <returns>An instance of <see cref="IncomingWebResponse"/> describing the response.</returns>
+ /// <exception cref="ProtocolException">Thrown for any network error.</exception>
+ /// <remarks>
+ /// <para>Implementations should catch <see cref="WebException"/> and wrap it in a
+ /// <see cref="ProtocolException"/> to abstract away the transport and provide
+ /// a single exception type for hosts to catch. The <see cref="WebException.Response"/>
+ /// value, if set, should be Closed before throwing.</para>
+ /// </remarks>
+ public IncomingWebResponse GetResponse(HttpWebRequest request, DirectWebRequestOptions options)
+ {
+ // If the request has an entity, the action would have already been processed in GetRequestStream.
+ if (request.Method == "GET") {
+ this.action(request);
+ }
+
+ return wrappedHandler.GetResponse(request, options);
+ }
+
+ #endregion
+ }
}
}
diff --git a/samples/InfoCardRelyingParty/Site.Master b/samples/InfoCardRelyingParty/Site.Master
index 7d3dae7..508f62c 100644
--- a/samples/InfoCardRelyingParty/Site.Master
+++ b/samples/InfoCardRelyingParty/Site.Master
@@ -19,9 +19,9 @@
<asp:LoginStatus ID="LoginStatus1" runat="server" />
</span>
<div>
- <a href="http://dotnetopenid.googlecode.com">
+ <a href="http://dotnetopenauth.net">
<img runat="server" src="~/images/dotnetopenid_tiny.gif" title="Jump to the project web site."
- alt="DotNetOpenId" border='0' /></a>
+ alt="DotNetOpenAuth" border='0' /></a>
</div>
<div>
<asp:ContentPlaceHolder ID="Main" runat="server" />
diff --git a/samples/OAuthConsumer/Twitter.aspx.cs b/samples/OAuthConsumer/Twitter.aspx.cs
index a4fb0cb..9b9eced 100644
--- a/samples/OAuthConsumer/Twitter.aspx.cs
+++ b/samples/OAuthConsumer/Twitter.aspx.cs
@@ -54,7 +54,7 @@ public partial class Twitter : System.Web.UI.Page {
protected void downloadUpdates_Click(object sender, EventArgs e) {
var twitter = new WebConsumer(TwitterConsumer.ServiceDescription, this.TokenManager);
- XPathDocument updates = new XPathDocument(TwitterConsumer.GetUpdates(twitter, AccessToken).CreateReader());
+ XPathDocument updates = new XPathDocument(TwitterConsumer.GetUpdates(twitter, this.AccessToken).CreateReader());
XPathNavigator nav = updates.CreateNavigator();
var parsedUpdates = from status in nav.Select("/statuses/status").OfType<XPathNavigator>()
where !status.SelectSingleNode("user/protected").ValueAsBoolean
diff --git a/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj b/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj
index 1bb2367..be1e9c3 100644
--- a/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj
+++ b/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj
@@ -15,6 +15,8 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<UICulture>en-US</UICulture>
+ <OutputPath Condition=" '$(OutputPath)' == '' ">bin\$(Configuration)\</OutputPath>
+ <TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v3.5</TargetFrameworkVersion>
<ApplicationIcon>openid.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -161,11 +163,5 @@
<Resource Include="openid.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
+ <Import Project="..\..\tools\DotNetOpenAuth.Versioning.targets" />
+</Project>
diff --git a/samples/OpenIdOfflineProvider/Properties/AssemblyInfo.cs b/samples/OpenIdOfflineProvider/Properties/AssemblyInfo.cs
index adaded3..77d7464 100644
--- a/samples/OpenIdOfflineProvider/Properties/AssemblyInfo.cs
+++ b/samples/OpenIdOfflineProvider/Properties/AssemblyInfo.cs
@@ -10,6 +10,8 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Windows;
+// We DON'T put an AssemblyVersionAttribute in here because it is generated in the build.
+
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -36,16 +38,3 @@ using System.Windows;
ResourceDictionaryLocation.SourceAssembly)] // where the generic resource dictionary is located
// (used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/samples/OpenIdProviderMvc/Views/Shared/Site.Master b/samples/OpenIdProviderMvc/Views/Shared/Site.Master
index 073908e..49f6a7f 100644
--- a/samples/OpenIdProviderMvc/Views/Shared/Site.Master
+++ b/samples/OpenIdProviderMvc/Views/Shared/Site.Master
@@ -2,11 +2,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
-<head runat="server">
+<head>
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
- <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
+ <link href='<%= Url.Content("~/Content/Site.css") %>' rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server" />
</head>
<body>
diff --git a/samples/OpenIdProviderMvc/Views/Shared/Xrds.aspx b/samples/OpenIdProviderMvc/Views/Shared/Xrds.aspx
index 7aad102..0d73909 100644
--- a/samples/OpenIdProviderMvc/Views/Shared/Xrds.aspx
+++ b/samples/OpenIdProviderMvc/Views/Shared/Xrds.aspx
@@ -27,5 +27,13 @@ for all XRDS discovery.
<Type>http://specs.openid.net/extensions/ui/1.0/icon</Type>--%>
<URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/OpenId/Provider"))%></URI>
</Service>
+<% if (ViewData["OPIdentifier"] == null) { %>
+ <Service priority="20">
+ <Type>http://openid.net/signon/1.0</Type>
+ <Type>http://openid.net/extensions/sreg/1.1</Type>
+ <Type>http://axschema.org/contact/email</Type>
+ <URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/OpenId/Provider"))%></URI>
+ </Service>
+<% } %>
</XRD>
</xrds:XRDS>
diff --git a/samples/OpenIdProviderWebForms/ProfileFields.ascx.cs b/samples/OpenIdProviderWebForms/ProfileFields.ascx.cs
index 893830f..6954aa6 100644
--- a/samples/OpenIdProviderWebForms/ProfileFields.ascx.cs
+++ b/samples/OpenIdProviderWebForms/ProfileFields.ascx.cs
@@ -76,15 +76,15 @@ namespace OpenIdProviderWebForms {
this.privacyLink.Visible = false;
}
- this.dobRequiredLabel.Visible = (requestFields.BirthDate == DemandLevel.Require);
- this.countryRequiredLabel.Visible = (requestFields.Country == DemandLevel.Require);
- this.emailRequiredLabel.Visible = (requestFields.Email == DemandLevel.Require);
- this.fullnameRequiredLabel.Visible = (requestFields.FullName == DemandLevel.Require);
- this.genderRequiredLabel.Visible = (requestFields.Gender == DemandLevel.Require);
- this.languageRequiredLabel.Visible = (requestFields.Language == DemandLevel.Require);
- this.nicknameRequiredLabel.Visible = (requestFields.Nickname == DemandLevel.Require);
- this.postcodeRequiredLabel.Visible = (requestFields.PostalCode == DemandLevel.Require);
- this.timezoneRequiredLabel.Visible = (requestFields.TimeZone == DemandLevel.Require);
+ this.dobRequiredLabel.Visible = requestFields.BirthDate == DemandLevel.Require;
+ this.countryRequiredLabel.Visible = requestFields.Country == DemandLevel.Require;
+ this.emailRequiredLabel.Visible = requestFields.Email == DemandLevel.Require;
+ this.fullnameRequiredLabel.Visible = requestFields.FullName == DemandLevel.Require;
+ this.genderRequiredLabel.Visible = requestFields.Gender == DemandLevel.Require;
+ this.languageRequiredLabel.Visible = requestFields.Language == DemandLevel.Require;
+ this.nicknameRequiredLabel.Visible = requestFields.Nickname == DemandLevel.Require;
+ this.postcodeRequiredLabel.Visible = requestFields.PostalCode == DemandLevel.Require;
+ this.timezoneRequiredLabel.Visible = requestFields.TimeZone == DemandLevel.Require;
this.dateOfBirthRow.Visible = !(requestFields.BirthDate == DemandLevel.NoRequest);
this.countryRow.Visible = !(requestFields.Country == DemandLevel.NoRequest);
diff --git a/samples/OpenIdProviderWebForms/Site.Master b/samples/OpenIdProviderWebForms/Site.Master
index 8780550..4df9e0a 100644
--- a/samples/OpenIdProviderWebForms/Site.Master
+++ b/samples/OpenIdProviderWebForms/Site.Master
@@ -9,9 +9,9 @@
</head>
<body>
<form id="form1" runat="server">
- <div><a href="http://dotnetopenid.googlecode.com">
+ <div><a href="http://dotnetopenauth.net">
<img runat="server" src="~/images/dotnetopenid_tiny.gif" title="Jump to the project web site."
- alt="DotNetOpenId" border='0' /></a> </div>
+ alt="DotNetOpenAuth" border='0' /></a> </div>
<div>
<asp:ContentPlaceHolder ID="Main" runat="server" />
</div>
diff --git a/samples/OpenIdProviderWebForms/Web.config b/samples/OpenIdProviderWebForms/Web.config
index 5db477c..cd070ba 100644
--- a/samples/OpenIdProviderWebForms/Web.config
+++ b/samples/OpenIdProviderWebForms/Web.config
@@ -43,7 +43,7 @@
</settings>
</system.net>
- <!-- this is an optional configuration section where aspects of dotnetopenid can be customized -->
+ <!-- this is an optional configuration section where aspects of DotNetOpenAuth can be customized -->
<dotNetOpenAuth>
<openid>
<provider>
@@ -125,7 +125,7 @@
</authorization>
</system.web>
</location>
- <!-- log4net is a 3rd party (free) logger library that dotnetopenid will use if present but does not require. -->
+ <!-- log4net is a 3rd party (free) logger library that DotNetOpenAuth will use if present but does not require. -->
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="Provider.log"/>
diff --git a/samples/OpenIdProviderWebForms/server.aspx b/samples/OpenIdProviderWebForms/server.aspx
index d3ce78d..a874ccd 100644
--- a/samples/OpenIdProviderWebForms/server.aspx
+++ b/samples/OpenIdProviderWebForms/server.aspx
@@ -25,7 +25,7 @@
<table>
<tr>
<td>
- <a href="http://dotnetopenid.googlecode.com/">http://dotnetopenid.googlecode.com/</a>
+ <a href="http://dotnetopenauth.net/">http://dotnetopenauth.net/</a>
</td>
<td>
Home of this library
diff --git a/samples/OpenIdRelyingPartyClassicAsp/MembersOnly.asp b/samples/OpenIdRelyingPartyClassicAsp/MembersOnly.asp
index 741a3e7..da6c18b 100644
--- a/samples/OpenIdRelyingPartyClassicAsp/MembersOnly.asp
+++ b/samples/OpenIdRelyingPartyClassicAsp/MembersOnly.asp
@@ -11,7 +11,7 @@ End If
</head>
<body>
<div>
- <a href="http://DotNetOpenId.googlecode.com">
+ <a href="http://dotnetopenauth.net">
<img runat="server" src="images/DotNetOpenId_tiny.gif" title="Jump to the project web site."
alt="DotNetOpenAuth" border='0' /></a>
</div>
diff --git a/samples/OpenIdRelyingPartyClassicAsp/default.asp b/samples/OpenIdRelyingPartyClassicAsp/default.asp
index bdddbcc..f4d1d1d 100644
--- a/samples/OpenIdRelyingPartyClassicAsp/default.asp
+++ b/samples/OpenIdRelyingPartyClassicAsp/default.asp
@@ -6,7 +6,7 @@
</head>
<body>
<div>
- <a href="http://DotNetOpenId.googlecode.com">
+ <a href="http://dotnetopenauth.net">
<img runat="server" src="images/DotNetOpenId_tiny.gif" title="Jump to the project web site."
alt="DotNetOpenAuth" border='0' /></a>
</div>
diff --git a/samples/OpenIdRelyingPartyClassicAsp/login.asp b/samples/OpenIdRelyingPartyClassicAsp/login.asp
index d222e57..449af3e 100644
--- a/samples/OpenIdRelyingPartyClassicAsp/login.asp
+++ b/samples/OpenIdRelyingPartyClassicAsp/login.asp
@@ -6,7 +6,7 @@
</head>
<body>
<div>
- <a href="http://DotNetOpenId.googlecode.com">
+ <a href="http://dotnetopenauth.net">
<img runat="server" src="images/DotNetOpenId_tiny.gif" title="Jump to the project web site."
alt="DotNetOpenAuth" border='0' /></a>
</div>
diff --git a/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs b/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs
index fd22389..b3698bb 100644
--- a/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs
+++ b/samples/OpenIdRelyingPartyMvc/Controllers/UserController.cs
@@ -14,7 +14,7 @@
public ActionResult Index() {
if (!User.Identity.IsAuthenticated) {
- Response.Redirect("/User/Login?ReturnUrl=Index");
+ Response.Redirect("~/User/Login?ReturnUrl=Index");
}
return View("Index");
@@ -26,7 +26,7 @@
public ActionResult Logout() {
FormsAuthentication.SignOut();
- return Redirect("/Home");
+ return Redirect("~/Home");
}
public ActionResult Login() {
diff --git a/samples/OpenIdRelyingPartyMvc/Views/Home/Index.aspx b/samples/OpenIdRelyingPartyMvc/Views/Home/Index.aspx
index 8535c7c..be4bd20 100644
--- a/samples/OpenIdRelyingPartyMvc/Views/Home/Index.aspx
+++ b/samples/OpenIdRelyingPartyMvc/Views/Home/Index.aspx
@@ -2,7 +2,7 @@
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<h1>OpenID Relying Party </h1>
- <h2>Provided by <a href="http://dotnetopenid.googlecode.com">DotNetOpenAuth</a> </h2>
+ <h2>Provided by <a href="http://dotnetopenauth.net">DotNetOpenAuth</a> </h2>
<% if (User.Identity.IsAuthenticated) { %>
<p><b>You are already logged in!</b> Try visiting the
<%=Html.ActionLink("Members Only", "Index", "User") %>
diff --git a/samples/OpenIdRelyingPartyMvc/Views/Shared/Site.Master b/samples/OpenIdRelyingPartyMvc/Views/Shared/Site.Master
index d9b759c..35c101d 100644
--- a/samples/OpenIdRelyingPartyMvc/Views/Shared/Site.Master
+++ b/samples/OpenIdRelyingPartyMvc/Views/Shared/Site.Master
@@ -2,10 +2,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
-<head runat="server">
+<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>DotNetOpenAuth ASP.NET MVC Login sample</title>
- <link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
+ <link href='<%= Url.Content("~/Content/Site.css") %>' rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContentPlaceHolder" runat="server" />
</head>
<body>
@@ -26,7 +26,7 @@
<div class="leftColumn">
<h2>External OpenID Links</h2>
<ul>
- <li><a href="http://dotnetopenid.googlecode.com">DotNetOpenAuth</a></li>
+ <li><a href="http://dotnetopenauth.net">DotNetOpenAuth</a></li>
<li><a href="http://openid.net">About OpenID</a></li>
</ul>
</div>
diff --git a/samples/OpenIdRelyingPartyMvc/Views/User/LoginPopup.aspx b/samples/OpenIdRelyingPartyMvc/Views/User/LoginPopup.aspx
index e7bc18a..2f4b276 100644
--- a/samples/OpenIdRelyingPartyMvc/Views/User/LoginPopup.aspx
+++ b/samples/OpenIdRelyingPartyMvc/Views/User/LoginPopup.aspx
@@ -7,10 +7,10 @@
<head>
<title>OpenID login demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <link type="text/css" href="../../Content/theme/ui.all.css" rel="Stylesheet" />
- <link type="text/css" href="../../Content/css/openidlogin.css" rel="stylesheet" />
- <script type="text/javascript" src="../../Content/scripts/jquery-1.3.1.js"></script>
- <script type="text/javascript" src="../../Content/scripts/jquery-ui-personalized-1.6rc6.js"></script>
+ <link type="text/css" href='<%= Url.Content("~/Content/theme/ui.all.css") %>' rel="Stylesheet" />
+ <link type="text/css" href='<%= Url.Content("~/Content/css/openidlogin.css") %>' rel="stylesheet" />
+ <script type="text/javascript" src='<%= Url.Content("~/Content/scripts/jquery-1.3.1.js") %>'></script>
+ <script type="text/javascript" src='<%= Url.Content("~/Content/scripts/jquery-ui-personalized-1.6rc6.js") %>'></script>
<script>
$(function() {
$('#openidlogin').dialog({
@@ -171,10 +171,10 @@
<div id="openidlogin" class="ui-widget-content">
<p>Log in with an account you already use:</p>
<div class="large buttons">
- <div class="provider" onclick="document.selectProvider(this, 'https://www.google.com/accounts/o8/id')"><div><img src="../../Content/images/google.gif"/></div></div>
- <div class="provider" onclick="document.selectProvider(this, 'https://me.yahoo.com/')"><div><img src="../../Content/images/yahoo.gif"/></div></div>
- <div class="provider" onclick="document.selectProvider(this, 'http://openid.aol.com/{username}')"><div><img src="../../Content/images/aol.gif"/></div></div>
- <div class="provider" onclick="document.selectProvider(this, '')"><div><img src="../../Content/images/openid.gif"/></div></div>
+ <div class="provider" onclick="document.selectProvider(this, 'https://www.google.com/accounts/o8/id')"><div><img src='<%= Url.Content("~/Content/images/google.gif") %>'/></div></div>
+ <div class="provider" onclick="document.selectProvider(this, 'https://me.yahoo.com/')"><div><img src='<%= Url.Content("~/Content/images/yahoo.gif") %>'/></div></div>
+ <div class="provider" onclick="document.selectProvider(this, 'http://openid.aol.com/{username}')"><div><img src='<%= Url.Content("~/Content/images/aol.gif") %>'/></div></div>
+ <div class="provider" onclick="document.selectProvider(this, '')"><div><img src='<%= Url.Content("~/Content/images/openid.gif") %>'/></div></div>
</div>
<div class="small buttons">
<div class="provider" onclick="document.selectProvider(this, 'http://www.flickr.com/photos/{username}')"><div><img src="http://flickr.com/favicon.ico"/></div></div>
diff --git a/samples/OpenIdRelyingPartyMvc/Web.config b/samples/OpenIdRelyingPartyMvc/Web.config
index da36d72..bf37616 100644
--- a/samples/OpenIdRelyingPartyMvc/Web.config
+++ b/samples/OpenIdRelyingPartyMvc/Web.config
@@ -117,7 +117,7 @@
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms">
- <forms defaultUrl="/Home" loginUrl="/User/Login" name="OpenIdRelyingPartyMvcSession"/>
+ <forms defaultUrl="~/Home" loginUrl="~/User/Login" name="OpenIdRelyingPartyMvcSession"/>
<!-- named cookie prevents conflicts with other samples -->
</authentication>
<!--
diff --git a/samples/OpenIdRelyingPartyWebForms/Site.Master b/samples/OpenIdRelyingPartyWebForms/Site.Master
index 9630f78..cf8c507 100644
--- a/samples/OpenIdRelyingPartyWebForms/Site.Master
+++ b/samples/OpenIdRelyingPartyWebForms/Site.Master
@@ -27,9 +27,9 @@
<asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" />
</span>
<div>
- <a href="http://dotnetopenid.googlecode.com">
+ <a href="http://dotnetopenauth.net">
<img runat="server" src="~/images/dotnetopenid_tiny.gif" title="Jump to the project web site."
- alt="DotNetOpenId" border='0' /></a>
+ alt="DotNetOpenAuth" border='0' /></a>
</div>
<div>
<asp:ContentPlaceHolder ID="Main" runat="server" />
diff --git a/samples/OpenIdRelyingPartyWebForms/Web.config b/samples/OpenIdRelyingPartyWebForms/Web.config
index 536294a..7c35f74 100644
--- a/samples/OpenIdRelyingPartyWebForms/Web.config
+++ b/samples/OpenIdRelyingPartyWebForms/Web.config
@@ -73,7 +73,7 @@
<trust level="Medium" originUrl=".*"/>
</system.web>
- <!-- log4net is a 3rd party (free) logger library that dotnetopenid will use if present but does not require. -->
+ <!-- log4net is a 3rd party (free) logger library that DotNetOpenAuth will use if present but does not require. -->
<log4net>
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="RelyingParty.log" />
diff --git a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs
index ffaf6f0..de44e35 100644
--- a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs
+++ b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs
@@ -18,7 +18,7 @@
}
protected void OpenIdAjaxTextBox1_LoggedIn(object sender, OpenIdEventArgs e) {
- Label label = ((Label)this.commentSubmitted.FindControl("emailLabel"));
+ Label label = (Label)this.commentSubmitted.FindControl("emailLabel");
label.Text = e.Response.FriendlyIdentifierForDisplay;
// We COULD get the sreg extension response here for the email, but since we let the user
diff --git a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx
index 78179f7..a00eccd 100644
--- a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx
+++ b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx
@@ -12,5 +12,4 @@
Visible="False" />
<asp:Label ID="loginCanceledLabel" runat="server" EnableViewState="False" Text="Login canceled"
Visible="False" />
- <asp:CheckBox ID="noLoginCheckBox" runat="server" Text="Extensions only (no login) -- most OPs don't yet support this" />
</asp:Content> \ No newline at end of file
diff --git a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs
index 239d7b8..088e305 100644
--- a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs
+++ b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.4918
+// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -66,14 +66,5 @@ namespace OpenIdRelyingPartyWebForms {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label loginCanceledLabel;
-
- /// <summary>
- /// noLoginCheckBox control.
- /// </summary>
- /// <remarks>
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- /// </remarks>
- protected global::System.Web.UI.WebControls.CheckBox noLoginCheckBox;
}
}
diff --git a/samples/README.html b/samples/README.html
index 287942a..10e0f8c 100644
--- a/samples/README.html
+++ b/samples/README.html
@@ -94,22 +94,22 @@
<h3>Interesting classes and methods</h3>
<h4>Relying party</h4>
<ul>
- <li>DotNetOpenId.RelyingParty.<b>OpenIdRelyingParty</b> - programmatic access to everything
+ <li>DotNetOpenAuth.OpenId.RelyingParty.<b>OpenIdRelyingParty</b> - programmatic access to everything
a relying party web site needs.</li>
- <li>DotNetOpenId.RelyingParty.<b>OpenIdTextBox</b> - An ASP.NET control that is a bare-bones
+ <li>DotNetOpenAuth.OpenId.RelyingParty.<b>OpenIdTextBox</b> - An ASP.NET control that is a bare-bones
text input box with a LogOn method that automatically does all the OpenId stuff
for you.</li>
- <li>DotNetOpenId.RelyingParty.<b>OpenIdLogin</b> - Like the OpenIdTextBox, but has a
+ <li>DotNetOpenAuth.OpenId.RelyingParty.<b>OpenIdLogin</b> - Like the OpenIdTextBox, but has a
Login button and some other end user-friendly UI built-in.&nbsp; Drop this onto
your web form and you&#39;re all done!</li>
</ul>
<h4>Provider</h4>
<ul>
- <li>DotNetOpenId.Provider.<b>OpenIdProvider</b> - programmatic access to everything
+ <li>DotNetOpenAuth.OpenId.Provider.<b>OpenIdProvider</b> - programmatic access to everything
a provider web site needs.</li>
- <li>DotNetOpenId.Provider.<b>ProviderEndpoint</b> - An ASP.NET control that you can
+ <li>DotNetOpenAuth.OpenId.Provider.<b>ProviderEndpoint</b> - An ASP.NET control that you can
drop in and have an instant provider endpoint on your page.</li>
- <li>DotNetOpenId.Provider.<b>IdentityEndpoint</b> - An ASP.NET control that you can
+ <li>DotNetOpenAuth.OpenId.Provider.<b>IdentityEndpoint</b> - An ASP.NET control that you can
drop onto the page for your own or your customers&#39; individual identity pages
for discovery by Relying Parties.</li>
</ul>