summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/CustomExtensions/UIRequestAtRelyingPartyFactory.cs47
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj1
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs5
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/Util.cs2
-rw-r--r--samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj4
-rw-r--r--samples/OAuthServiceProvider/Code/Global.cs9
-rw-r--r--samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj18
-rw-r--r--samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj4
-rw-r--r--samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj4
-rw-r--r--samples/OpenIdRelyingPartyMvc/Web.config7
-rw-r--r--samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx16
-rw-r--r--samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.cs46
-rw-r--r--samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.designer.cs42
-rw-r--r--samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj8
-rw-r--r--samples/OpenIdRelyingPartyWebForms/Web.config7
-rw-r--r--samples/OpenIdRelyingPartyWebFormsVB/Web.config7
-rw-r--r--samples/OpenIdWebRingSsoProvider/OpenIdWebRingSsoProvider.csproj4
-rw-r--r--samples/OpenIdWebRingSsoRelyingParty/Web.config7
-rw-r--r--samples/tools.proj1
19 files changed, 221 insertions, 18 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/CustomExtensions/UIRequestAtRelyingPartyFactory.cs b/samples/DotNetOpenAuth.ApplicationBlock/CustomExtensions/UIRequestAtRelyingPartyFactory.cs
new file mode 100644
index 0000000..e8adfe3
--- /dev/null
+++ b/samples/DotNetOpenAuth.ApplicationBlock/CustomExtensions/UIRequestAtRelyingPartyFactory.cs
@@ -0,0 +1,47 @@
+//-----------------------------------------------------------------------
+// <copyright file="UIRequestAtRelyingPartyFactory.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.ApplicationBlock.CustomExtensions {
+ using System.Collections.Generic;
+ using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.OpenId.ChannelElements;
+ using DotNetOpenAuth.OpenId.Extensions.UI;
+
+ /// <summary>
+ /// An extension factory that allows the <see cref="UIRequest"/> extension to be received by the relying party.
+ /// </summary>
+ /// <remarks>
+ /// Typically UIRequest is only received by the Provider. But Google mirrors back this data to the relying party
+ /// if our web user is already logged into Google.
+ /// See the OpenIdRelyingPartyWebForms sample's DetectGoogleSession.aspx page for usage of this factory.
+ /// </remarks>
+ public class UIRequestAtRelyingPartyFactory : IOpenIdExtensionFactory {
+ /// <summary>
+ /// The Type URI for the UI extension.
+ /// </summary>
+ private const string UITypeUri = "http://specs.openid.net/extensions/ui/1.0";
+
+ /// <summary>
+ /// Allows UIRequest extensions to be received by the relying party. Useful when Google mirrors back the request
+ /// to indicate that a user is logged in.
+ /// </summary>
+ /// <param name="typeUri">The type URI of the extension.</param>
+ /// <param name="data">The parameters associated specifically with this extension.</param>
+ /// <param name="baseMessage">The OpenID message carrying this extension.</param>
+ /// <param name="isProviderRole">A value indicating whether this extension is being received at the OpenID Provider.</param>
+ /// <returns>
+ /// An instance of <see cref="IOpenIdMessageExtension"/> if the factory recognizes
+ /// the extension described in the input parameters; <c>null</c> otherwise.
+ /// </returns>
+ public DotNetOpenAuth.OpenId.Messages.IOpenIdMessageExtension Create(string typeUri, IDictionary<string, string> data, IProtocolMessageWithExtensions baseMessage, bool isProviderRole) {
+ if (typeUri == UITypeUri && !isProviderRole) {
+ return new UIRequest();
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj b/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
index adb1998..5a3e532 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
+++ b/samples/DotNetOpenAuth.ApplicationBlock/DotNetOpenAuth.ApplicationBlock.csproj
@@ -87,6 +87,7 @@
<Compile Include="CustomExtensions\Acme.cs" />
<Compile Include="CustomExtensions\AcmeRequest.cs" />
<Compile Include="CustomExtensions\AcmeResponse.cs" />
+ <Compile Include="CustomExtensions\UIRequestAtRelyingPartyFactory.cs" />
<Compile Include="GoogleConsumer.cs" />
<Compile Include="InMemoryTokenManager.cs">
<SubType>Code</SubType>
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
index 558d4bc..474a569 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/GoogleConsumer.cs
@@ -222,6 +222,11 @@ namespace DotNetOpenAuth.ApplicationBlock {
{ "max-results", maxResults.ToString(CultureInfo.InvariantCulture) },
};
var request = consumer.PrepareAuthorizedRequest(GetContactsEndpoint, accessToken, extraData);
+
+ // Enable gzip compression. Google only compresses the response for recognized user agent headers. - Mike Lim
+ request.AutomaticDecompression = DecompressionMethods.GZip;
+ request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.151 Safari/534.16";
+
var response = consumer.Channel.WebRequestHandler.GetResponse(request);
string body = response.GetResponseReader().ReadToEnd();
XDocument result = XDocument.Parse(body);
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/Util.cs b/samples/DotNetOpenAuth.ApplicationBlock/Util.cs
index 4b4113d..0bec372 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/Util.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/Util.cs
@@ -124,7 +124,7 @@
private readonly Action<HttpWebRequest> action;
/// <summary>
- /// Initializes a new instance of the <see cref="Util.WrappingWebRequestHandler"/> class.
+ /// 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>
diff --git a/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj b/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj
index 32f1093..8654ec1 100644
--- a/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj
+++ b/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj
@@ -107,7 +107,7 @@
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
- <Reference Include="System.Xaml">
+ <Reference Include="System.Xaml" Condition=" '$(TargetFrameworkVersion)' != 'v3.5' ">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
</ItemGroup>
@@ -227,4 +227,4 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
-</Project> \ No newline at end of file
+</Project>
diff --git a/samples/OAuthServiceProvider/Code/Global.cs b/samples/OAuthServiceProvider/Code/Global.cs
index ceaeac8..60fed9f 100644
--- a/samples/OAuthServiceProvider/Code/Global.cs
+++ b/samples/OAuthServiceProvider/Code/Global.cs
@@ -117,6 +117,15 @@
private void Application_Error(object sender, EventArgs e) {
Logger.Error("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError());
+
+ // In the event of an unhandled exception, reverse any changes that were made to the database to avoid any partial database updates.
+ var dataContext = dataContextSimple;
+ if (dataContext != null) {
+ dataContext.Transaction.Rollback();
+ dataContext.Connection.Close();
+ dataContext.Dispose();
+ dataContextSimple = null;
+ }
}
private void Application_EndRequest(object sender, EventArgs e) {
diff --git a/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj b/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj
index dd077d0..beb332d 100644
--- a/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj
+++ b/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj
@@ -119,7 +119,7 @@
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
- <Reference Include="System.Xaml">
+ <Reference Include="System.Xaml" Condition=" '$(TargetFrameworkVersion)' != 'v3.5' ">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
</ItemGroup>
@@ -215,11 +215,19 @@
<!-- Don't sign the non-unified version of the assembly. -->
<SuppressTargetPathDelaySignedAssembly>true</SuppressTargetPathDelaySignedAssembly>
</PropertyGroup>
+ <!-- These items should never be visible. In the project source tree, they're invisible because of an ItemDefinitionGroup
+ in DotNetOpenAuth.props. But in the shipping samples that file is not included, so we must still set Visible=false explicitly.. -->
<ItemGroup>
- <SignDependsOn Include="BuildUnified" />
- <DelaySignedAssemblies Include="$(ILMergeProjectOutputAssembly)" />
+ <SignDependsOn Include="BuildUnified">
+ <Visible>false</Visible>
+ </SignDependsOn>
+ <DelaySignedAssemblies Include="$(ILMergeProjectOutputAssembly)">
+ <Visible>false</Visible>
+ </DelaySignedAssemblies>
<ILMergeProjectInputAssemblies Include="$(TargetPath);
- $(ProjectRoot)lib\Microsoft.Contracts.dll; "/>
+ $(ProjectRoot)lib\Microsoft.Contracts.dll; ">
+ <Visible>false</Visible>
+ </ILMergeProjectInputAssemblies>
</ItemGroup>
<Target Name="BuildUnified" DependsOnTargets="Build" Inputs="@(ILMergeProjectInputAssemblies)" Outputs="$(ILMergeProjectOutputAssembly)">
<MakeDir Directories="$(ILMergeOutputAssemblyDirectory)" />
@@ -227,4 +235,4 @@
</Target>
<Import Project="$(ProjectRoot)tools\DotNetOpenAuth.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
-</Project> \ No newline at end of file
+</Project>
diff --git a/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj b/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj
index 9dc060e..d609a29 100644
--- a/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj
+++ b/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj
@@ -50,7 +50,7 @@
<Reference Include="System.Web.Extensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
- <Reference Include="System.Web.ApplicationServices">
+ <Reference Include="System.Web.ApplicationServices" Condition=" '$(TargetFrameworkVersion)' != 'v3.5' ">
<RequiredTargetFramework>v4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web.Abstractions" />
@@ -153,4 +153,4 @@
</VisualStudio>
</ProjectExtensions>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
-</Project> \ No newline at end of file
+</Project>
diff --git a/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj b/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj
index 66e0f6a..861cdb7 100644
--- a/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj
+++ b/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj
@@ -68,7 +68,7 @@
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Xml.Linq" />
- <Reference Include="System.Web.ApplicationServices">
+ <Reference Include="System.Web.ApplicationServices" Condition=" '$(TargetFrameworkVersion)' != 'v3.5' ">
<RequiredTargetFramework>v4.0</RequiredTargetFramework>
</Reference>
</ItemGroup>
@@ -221,4 +221,4 @@
</VisualStudio>
</ProjectExtensions>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
-</Project> \ No newline at end of file
+</Project>
diff --git a/samples/OpenIdRelyingPartyMvc/Web.config b/samples/OpenIdRelyingPartyMvc/Web.config
index 8101fb2..9561a28 100644
--- a/samples/OpenIdRelyingPartyMvc/Web.config
+++ b/samples/OpenIdRelyingPartyMvc/Web.config
@@ -38,7 +38,12 @@
<dotNetOpenAuth>
<openid>
<relyingParty>
- <security requireSsl="false" />
+ <security requireSsl="false">
+ <!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
+ <!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
+ <add endpoint="https://www.google.com/accounts/o8/ud" />
+ </trustedProviders>-->
+ </security>
<behaviors>
<!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
with OPs that use Attribute Exchange (in various formats). -->
diff --git a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx
new file mode 100644
index 0000000..403858f
--- /dev/null
+++ b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx
@@ -0,0 +1,16 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DetectGoogleSession.aspx.cs"
+ Inherits="OpenIdRelyingPartyWebForms.DetectGoogleSession" ValidateRequest="false"
+ MasterPageFile="~/Site.Master" %>
+
+<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.RelyingParty"
+ TagPrefix="rp" %>
+<%@ Register Assembly="DotNetOpenAuth" Namespace="DotNetOpenAuth.OpenId.Extensions.SimpleRegistration"
+ TagPrefix="sreg" %>
+<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main">
+ <asp:Label Text="We've detected that you're logged into Google!" runat="server" Visible="false"
+ ID="YouAreLoggedInLabel" />
+ <asp:Label Text="We've detected that you're logged into Google because your Google account trusts this site!" runat="server" Visible="false"
+ ID="YouTrustUsLabel" />
+ <asp:Label Text="We've detected that you're NOT logged into Google!" runat="server" Visible="false"
+ ID="YouAreNotLoggedInLabel" />
+</asp:Content>
diff --git a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.cs b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.cs
new file mode 100644
index 0000000..98fe745
--- /dev/null
+++ b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.cs
@@ -0,0 +1,46 @@
+namespace OpenIdRelyingPartyWebForms {
+ using System;
+ using DotNetOpenAuth.ApplicationBlock.CustomExtensions;
+ using DotNetOpenAuth.OpenId.Extensions.UI;
+ using DotNetOpenAuth.OpenId.RelyingParty;
+
+ public partial class DetectGoogleSession : System.Web.UI.Page {
+ private const string GoogleOPIdentifier = "https://www.google.com/accounts/o8/id";
+
+ private const string UIModeDetectSession = "x-has-session";
+
+ protected void Page_Load(object sender, EventArgs e) {
+ using (var openid = new OpenIdRelyingParty()) {
+ // In order to receive the UIRequest as a response, we must register a custom extension factory.
+ openid.ExtensionFactories.Add(new UIRequestAtRelyingPartyFactory());
+
+ var response = openid.GetResponse();
+ if (response == null) {
+ // Submit an OpenID request which Google must reply to immediately.
+ // If the user hasn't established a trust relationship with this site yet,
+ // Google will not give us the user identity, but they will tell us whether the user
+ // at least has an active login session with them so we know whether to promote the
+ // "Log in with Google" button.
+ IAuthenticationRequest request = openid.CreateRequest("https://www.google.com/accounts/o8/id");
+ request.AddExtension(new UIRequest { Mode = UIModeDetectSession });
+ request.Mode = AuthenticationRequestMode.Immediate;
+ request.RedirectToProvider();
+ } else {
+ if (response.Status == AuthenticationStatus.Authenticated) {
+ this.YouTrustUsLabel.Visible = true;
+ } else if (response.Status == AuthenticationStatus.SetupRequired) {
+ // Google refused to authenticate the user without user interaction.
+ // This is either because Google doesn't know who the user is yet,
+ // or because the user hasn't indicated to Google to trust this site.
+ // Google uniquely offers the RP a tip as to which of the above situations is true.
+ // Figure out which it is. In a real app, you might use this value to promote a
+ // Google login button on your site if you detect that a Google session exists.
+ var ext = response.GetUntrustedExtension<UIRequest>();
+ this.YouAreLoggedInLabel.Visible = ext != null && ext.Mode == UIModeDetectSession;
+ this.YouAreNotLoggedInLabel.Visible = !this.YouAreLoggedInLabel.Visible;
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.designer.cs
new file mode 100644
index 0000000..576c646
--- /dev/null
+++ b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.designer.cs
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace OpenIdRelyingPartyWebForms {
+
+
+ public partial class DetectGoogleSession {
+
+ /// <summary>
+ /// YouAreLoggedInLabel 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.Label YouAreLoggedInLabel;
+
+ /// <summary>
+ /// YouTrustUsLabel 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.Label YouTrustUsLabel;
+
+ /// <summary>
+ /// YouAreNotLoggedInLabel 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.Label YouAreNotLoggedInLabel;
+ }
+}
diff --git a/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj b/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj
index 69c3e91..cbcd758 100644
--- a/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj
+++ b/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj
@@ -74,6 +74,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="Default.aspx" />
+ <Content Include="DetectGoogleSession.aspx" />
<Content Include="Global.asax" />
<Content Include="images\openid_login.png" />
<Content Include="login.aspx" />
@@ -110,6 +111,13 @@
</Compile>
<Compile Include="Code\State.cs" />
<Compile Include="Code\TracePageAppender.cs" />
+ <Compile Include="DetectGoogleSession.aspx.cs">
+ <DependentUpon>DetectGoogleSession.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="DetectGoogleSession.aspx.designer.cs">
+ <DependentUpon>DetectGoogleSession.aspx</DependentUpon>
+ </Compile>
<Compile Include="loginGoogleApps.aspx.cs">
<DependentUpon>loginGoogleApps.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
diff --git a/samples/OpenIdRelyingPartyWebForms/Web.config b/samples/OpenIdRelyingPartyWebForms/Web.config
index 5d3a33b..1f1842b 100644
--- a/samples/OpenIdRelyingPartyWebForms/Web.config
+++ b/samples/OpenIdRelyingPartyWebForms/Web.config
@@ -28,7 +28,12 @@
<dotNetOpenAuth>
<openid>
<relyingParty>
- <security requireSsl="false" />
+ <security requireSsl="false">
+ <!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
+ <!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
+ <add endpoint="https://www.google.com/accounts/o8/ud" />
+ </trustedProviders>-->
+ </security>
<behaviors>
<!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
with OPs that use Attribute Exchange (in various formats). -->
diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Web.config b/samples/OpenIdRelyingPartyWebFormsVB/Web.config
index 36174a5..51b3d26 100644
--- a/samples/OpenIdRelyingPartyWebFormsVB/Web.config
+++ b/samples/OpenIdRelyingPartyWebFormsVB/Web.config
@@ -28,7 +28,12 @@
<dotNetOpenAuth>
<openid>
<relyingParty>
- <security requireSsl="false" />
+ <security requireSsl="false">
+ <!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
+ <!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
+ <add endpoint="https://www.google.com/accounts/o8/ud" />
+ </trustedProviders>-->
+ </security>
<behaviors>
<!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
with OPs that use Attribute Exchange (in various formats). -->
diff --git a/samples/OpenIdWebRingSsoProvider/OpenIdWebRingSsoProvider.csproj b/samples/OpenIdWebRingSsoProvider/OpenIdWebRingSsoProvider.csproj
index 70ef5ac..3120f1e 100644
--- a/samples/OpenIdWebRingSsoProvider/OpenIdWebRingSsoProvider.csproj
+++ b/samples/OpenIdWebRingSsoProvider/OpenIdWebRingSsoProvider.csproj
@@ -55,7 +55,7 @@
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Xml.Linq" />
- <Reference Include="System.Web.ApplicationServices">
+ <Reference Include="System.Web.ApplicationServices" Condition=" '$(TargetFrameworkVersion)' != 'v3.5' ">
<RequiredTargetFramework>v4.0</RequiredTargetFramework>
</Reference>
</ItemGroup>
@@ -138,4 +138,4 @@
</VisualStudio>
</ProjectExtensions>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " />
-</Project> \ No newline at end of file
+</Project>
diff --git a/samples/OpenIdWebRingSsoRelyingParty/Web.config b/samples/OpenIdWebRingSsoRelyingParty/Web.config
index 3f50723..98e5c3f 100644
--- a/samples/OpenIdWebRingSsoRelyingParty/Web.config
+++ b/samples/OpenIdWebRingSsoRelyingParty/Web.config
@@ -40,7 +40,12 @@
<dotNetOpenAuth>
<openid>
<relyingParty>
- <security requireSsl="false" />
+ <security requireSsl="false">
+ <!-- Uncomment the trustedProviders tag if your relying party should only accept positive assertions from a closed set of OpenID Providers. -->
+ <!--<trustedProviders rejectAssertionsFromUntrustedProviders="true">
+ <add endpoint="https://www.google.com/accounts/o8/ud" />
+ </trustedProviders>-->
+ </security>
<behaviors>
<!-- The following OPTIONAL behavior allows RPs to use SREG only, but be compatible
with OPs that use Attribute Exchange (in various formats). -->
diff --git a/samples/tools.proj b/samples/tools.proj
index 9a8b70c..d72e364 100644
--- a/samples/tools.proj
+++ b/samples/tools.proj
@@ -27,6 +27,7 @@
$(OutputPath)$(ProductName).dll;
$(OutputPath)$(SignedSubPath)$(ProductName).dll;
$(ProjectRoot)lib\Microsoft.Contracts.dll;
+ $(OutputPath)System.Web.Mvc.dll;
" />
<!-- add the PDBs -->