diff options
author | David Christiansen <DavidChristiansen@users.noreply.github.com> | 2015-01-05 09:33:24 +0000 |
---|---|---|
committer | David Christiansen <DavidChristiansen@users.noreply.github.com> | 2015-01-05 09:33:24 +0000 |
commit | 3770a51d19a04be18ade75f59e0ff1687010a130 (patch) | |
tree | 240382c976672ed421d529860117e37677328f02 /samples | |
parent | 7574924b2b5c810b7c00328f04f506f28da3f2ec (diff) | |
parent | a14dcb800b25d1b0477ab123b6865d90865f96f0 (diff) | |
download | DotNetOpenAuth-3770a51d19a04be18ade75f59e0ff1687010a130.zip DotNetOpenAuth-3770a51d19a04be18ade75f59e0ff1687010a130.tar.gz DotNetOpenAuth-3770a51d19a04be18ade75f59e0ff1687010a130.tar.bz2 |
Merge pull request #359 from DavidChristiansen/develop
Closes #356, Closes #357, Closes #358
Diffstat (limited to 'samples')
142 files changed, 239 insertions, 6705 deletions
diff --git a/samples/OAuth2ProtectedWebApi/OAuth2ProtectedWebApi.csproj b/samples/OAuth2ProtectedWebApi/OAuth2ProtectedWebApi.csproj index 0ba56e6..d21c17d 100644 --- a/samples/OAuth2ProtectedWebApi/OAuth2ProtectedWebApi.csproj +++ b/samples/OAuth2ProtectedWebApi/OAuth2ProtectedWebApi.csproj @@ -8,7 +8,7 @@ </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{58A3721F-5B5C-4CA7-BE39-91640B5B4924}</ProjectGuid> - <ProjectTypeGuids>{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>OAuth2ProtectedWebApi</RootNamespace> @@ -93,7 +93,6 @@ <Reference Include="System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\src\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll</HintPath> - <Private>True</Private> </Reference> <Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> @@ -349,4 +348,4 @@ </Target> <Target Name="AfterBuild"> </Target> --> -</Project> +</Project>
\ No newline at end of file diff --git a/samples/OAuthAuthorizationServer/Global.asax.cs b/samples/OAuthAuthorizationServer/Global.asax.cs index d878ea6..8e3aefa 100644 --- a/samples/OAuthAuthorizationServer/Global.asax.cs +++ b/samples/OAuthAuthorizationServer/Global.asax.cs @@ -8,7 +8,9 @@ using Code;
- /// <summary>
+ using DotNetOpenAuth.Logging;
+
+ /// <summary>
/// The global MVC Application.
/// </summary>
/// <remarks>
@@ -24,7 +26,7 @@ /// <summary>
/// The logger for this sample to use.
/// </summary>
- public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthAuthorizationServer");
+ public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthAuthorizationServer");
public static DatabaseKeyNonceStore KeyNonceStore { get; set; }
@@ -83,19 +85,16 @@ KeyNonceStore = new DatabaseKeyNonceStore();
- log4net.Config.XmlConfigurator.Configure();
+/// LogProvider.SetCurrentLogProvider(new ....)
Logger.Info("Sample starting...");
}
protected void Application_End(object sender, EventArgs e) {
Logger.Info("Sample shutting down...");
-
- // this would be automatic, but in partial trust scenarios it is not.
- log4net.LogManager.Shutdown();
}
protected void Application_Error(object sender, EventArgs e) {
- Logger.Error("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError());
+ Logger.ErrorException("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;
diff --git a/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj b/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj index 1e373b3..0199aed 100644 --- a/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj +++ b/samples/OAuthAuthorizationServer/OAuthAuthorizationServer.csproj @@ -21,7 +21,7 @@ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{C78E8235-1D46-43EB-A912-80B522C4E9AE}</ProjectGuid> - <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>OAuthAuthorizationServer</RootNamespace> @@ -48,10 +48,6 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Private>True</Private> diff --git a/samples/OAuthAuthorizationServer/packages.config b/samples/OAuthAuthorizationServer/packages.config index 7d02581..5320a83 100644 --- a/samples/OAuthAuthorizationServer/packages.config +++ b/samples/OAuthAuthorizationServer/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.AspNet.Mvc" version="5.0.0" targetFramework="net45" /> <package id="Microsoft.AspNet.Razor" version="3.0.0" targetFramework="net45" /> <package id="Microsoft.AspNet.WebPages" version="3.0.0" targetFramework="net45" /> diff --git a/samples/OAuthClient/Code/Logging.cs b/samples/OAuthClient/Code/Logging.cs index 4e47e49..8fbf594 100644 --- a/samples/OAuthClient/Code/Logging.cs +++ b/samples/OAuthClient/Code/Logging.cs @@ -5,7 +5,9 @@ using System.Text; using System.Web; - /// <summary> + using DotNetOpenAuth.Logging; + + /// <summary> /// Logging tools for this sample. /// </summary> public static class Logging { @@ -17,6 +19,6 @@ /// <summary> /// The logger for this sample to use. /// </summary> - public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthClient"); + public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthClient"); } }
\ No newline at end of file diff --git a/samples/OAuthClient/Code/TracePageAppender.cs b/samples/OAuthClient/Code/TracePageAppender.cs deleted file mode 100644 index f41fd17..0000000 --- a/samples/OAuthClient/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OAuthClient { - using System; - using System.Collections.Generic; - using System.IO; - using System.Web; - - public class TracePageAppender : log4net.Appender.AppenderSkeleton { - protected override void Append(log4net.Core.LoggingEvent loggingEvent) { - StringWriter sw = new StringWriter(Logging.LogMessages); - Layout.Format(sw, loggingEvent); - } - } -}
\ No newline at end of file diff --git a/samples/OAuthClient/Global.asax.cs b/samples/OAuthClient/Global.asax.cs index 77d397e..0553cbc 100644 --- a/samples/OAuthClient/Global.asax.cs +++ b/samples/OAuthClient/Global.asax.cs @@ -4,17 +4,16 @@ using System.Linq; using System.Web; - public partial class Global : HttpApplication { + using DotNetOpenAuth.Logging; + + public partial class Global : HttpApplication { protected void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); + Logging.Logger.Info("Sample starting..."); } protected void Application_End(object sender, EventArgs e) { Logging.Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); } protected void Application_Error(object sender, EventArgs e) { diff --git a/samples/OAuthClient/OAuthClient.csproj b/samples/OAuthClient/OAuthClient.csproj index 83ff611..bb56aed 100644 --- a/samples/OAuthClient/OAuthClient.csproj +++ b/samples/OAuthClient/OAuthClient.csproj @@ -49,10 +49,6 @@ <DefineConstants>$(DefineConstants);SAMPLESONLY</DefineConstants> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Data.DataSetExtensions" /> @@ -155,7 +151,6 @@ <Compile Include="TracePage.aspx.designer.cs"> <DependentUpon>TracePage.aspx</DependentUpon> </Compile> - <Compile Include="Code\TracePageAppender.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="WindowsLive.aspx.cs"> <DependentUpon>WindowsLive.aspx</DependentUpon> diff --git a/samples/OAuthClient/packages.config b/samples/OAuthClient/packages.config index ea83ad2..c6cfe98 100644 --- a/samples/OAuthClient/packages.config +++ b/samples/OAuthClient/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> diff --git a/samples/OAuthConsumer/Code/Logging.cs b/samples/OAuthConsumer/Code/Logging.cs index 510ea85..dcd2813 100644 --- a/samples/OAuthConsumer/Code/Logging.cs +++ b/samples/OAuthConsumer/Code/Logging.cs @@ -5,7 +5,9 @@ using System.Text; using System.Web; - /// <summary> + using DotNetOpenAuth.Logging; + + /// <summary> /// Logging tools for this sample. /// </summary> public static class Logging { @@ -17,6 +19,6 @@ /// <summary> /// The logger for this sample to use. /// </summary> - public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthConsumer"); + public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthConsumer"); } }
\ No newline at end of file diff --git a/samples/OAuthConsumer/Code/TracePageAppender.cs b/samples/OAuthConsumer/Code/TracePageAppender.cs deleted file mode 100644 index 5d3ba36..0000000 --- a/samples/OAuthConsumer/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OAuthConsumer { - using System; - using System.Collections.Generic; - using System.IO; - using System.Web; - - public class TracePageAppender : log4net.Appender.AppenderSkeleton { - protected override void Append(log4net.Core.LoggingEvent loggingEvent) { - StringWriter sw = new StringWriter(Logging.LogMessages); - Layout.Format(sw, loggingEvent); - } - } -}
\ No newline at end of file diff --git a/samples/OAuthConsumer/Global.asax.cs b/samples/OAuthConsumer/Global.asax.cs index 10f297e..fbe339f 100644 --- a/samples/OAuthConsumer/Global.asax.cs +++ b/samples/OAuthConsumer/Global.asax.cs @@ -4,17 +4,16 @@ using System.Linq; using System.Web; - public partial class Global : HttpApplication { + using DotNetOpenAuth.Logging; + + public partial class Global : HttpApplication { protected void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); - Logging.Logger.Info("Sample starting..."); + /// LogProvider.SetCurrentLogProvider(new ....) + Logging.Logger.Info("Sample starting..."); } protected void Application_End(object sender, EventArgs e) { Logging.Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); } protected void Application_Error(object sender, EventArgs e) { diff --git a/samples/OAuthConsumer/OAuthConsumer.csproj b/samples/OAuthConsumer/OAuthConsumer.csproj index b51b800..e64a4ac 100644 --- a/samples/OAuthConsumer/OAuthConsumer.csproj +++ b/samples/OAuthConsumer/OAuthConsumer.csproj @@ -49,10 +49,6 @@ <DefineConstants>$(DefineConstants);SAMPLESONLY</DefineConstants> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="Microsoft.CSharp" /> <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\src\packages\Newtonsoft.Json.5.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> @@ -157,7 +153,6 @@ <SubType>ASPXCodeBehind</SubType> </Compile> <Compile Include="Code\Logging.cs" /> - <Compile Include="Code\TracePageAppender.cs" /> <Compile Include="GoogleAddressBook.aspx.cs"> <DependentUpon>GoogleAddressBook.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> diff --git a/samples/OAuthConsumer/packages.config b/samples/OAuthConsumer/packages.config index c75c944..94b1173 100644 --- a/samples/OAuthConsumer/packages.config +++ b/samples/OAuthConsumer/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> diff --git a/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj b/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj index 37c9bf0..3f4e151 100644 --- a/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj +++ b/samples/OAuthConsumerWpf/OAuthConsumerWpf.csproj @@ -68,9 +68,6 @@ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <Reference Include="log4net"> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.configuration" /> <Reference Include="System.Core"> diff --git a/samples/OAuthConsumerWpf/Properties/AssemblyInfo.cs b/samples/OAuthConsumerWpf/Properties/AssemblyInfo.cs index 59ee9c9..456aecc 100644 --- a/samples/OAuthConsumerWpf/Properties/AssemblyInfo.cs +++ b/samples/OAuthConsumerWpf/Properties/AssemblyInfo.cs @@ -16,8 +16,6 @@ using System.Windows; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -[assembly: log4net.Config.XmlConfigurator(Watch = true)] - // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/samples/OAuthConsumerWpf/packages.config b/samples/OAuthConsumerWpf/packages.config index eeb01f6..d7c8c89 100644 --- a/samples/OAuthConsumerWpf/packages.config +++ b/samples/OAuthConsumerWpf/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> diff --git a/samples/OAuthResourceServer/Code/Global.cs b/samples/OAuthResourceServer/Code/Global.cs index a48baff..bf58c9c 100644 --- a/samples/OAuthResourceServer/Code/Global.cs +++ b/samples/OAuthResourceServer/Code/Global.cs @@ -5,6 +5,8 @@ using System.ServiceModel; using System.Text; using System.Web; + + using DotNetOpenAuth.Logging; using DotNetOpenAuth.OAuth2; using DotNetOpenAuth.OAuth2.Messages; @@ -39,7 +41,7 @@ /// <summary> /// The logger for this sample to use. /// </summary> - public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthResourceServer"); + public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthResourceServer"); #if SAMPLESONLY /// <summary> @@ -85,19 +87,15 @@ } private void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); Logger.Info("Sample starting..."); } private void Application_End(object sender, EventArgs e) { Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); } private void Application_Error(object sender, EventArgs e) { - Logger.Error("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError()); + Logger.ErrorException("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError()); } private void Application_EndRequest(object sender, EventArgs e) { diff --git a/samples/OAuthResourceServer/Code/OAuthAuthorizationManager.cs b/samples/OAuthResourceServer/Code/OAuthAuthorizationManager.cs index 091c9bb..37853c3 100644 --- a/samples/OAuthResourceServer/Code/OAuthAuthorizationManager.cs +++ b/samples/OAuthResourceServer/Code/OAuthAuthorizationManager.cs @@ -11,6 +11,8 @@ using System.ServiceModel.Web; using System.Threading; using System.Threading.Tasks; + + using DotNetOpenAuth.Logging; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OAuth2; using ProtocolException = System.ServiceModel.ProtocolException; @@ -57,10 +59,10 @@ return false; } } catch (ProtocolFaultResponseException ex) { - Global.Logger.Error("Error processing OAuth messages.", ex); + Global.Logger.ErrorException("Error processing OAuth messages.", ex); exception = ex; } catch (ProtocolException ex) { - Global.Logger.Error("Error processing OAuth messages.", ex); + Global.Logger.ErrorException("Error processing OAuth messages.", ex); } if (exception != null) { diff --git a/samples/OAuthResourceServer/Code/TracePageAppender.cs b/samples/OAuthResourceServer/Code/TracePageAppender.cs deleted file mode 100644 index 4dc543f..0000000 --- a/samples/OAuthResourceServer/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OAuthResourceServer.Code { - using System; - using System.Collections.Generic; - using System.IO; - using System.Web; - - public class TracePageAppender : log4net.Appender.AppenderSkeleton { - protected override void Append(log4net.Core.LoggingEvent loggingEvent) { - StringWriter sw = new StringWriter(Global.LogMessages); - Layout.Format(sw, loggingEvent); - } - } -}
\ No newline at end of file diff --git a/samples/OAuthResourceServer/OAuthResourceServer.csproj b/samples/OAuthResourceServer/OAuthResourceServer.csproj index 2160d28..2180657 100644 --- a/samples/OAuthResourceServer/OAuthResourceServer.csproj +++ b/samples/OAuthResourceServer/OAuthResourceServer.csproj @@ -46,10 +46,6 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Data.DataSetExtensions" /> @@ -101,7 +97,6 @@ <Compile Include="Code\IDataApi.cs" /> <Compile Include="Code\OAuthAuthorizationManager.cs" /> <Compile Include="Code\OAuthPrincipalAuthorizationPolicy.cs" /> - <Compile Include="Code\TracePageAppender.cs" /> <Compile Include="Default.aspx.cs"> <DependentUpon>Default.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> diff --git a/samples/OAuthResourceServer/packages.config b/samples/OAuthResourceServer/packages.config index ea83ad2..c6cfe98 100644 --- a/samples/OAuthResourceServer/packages.config +++ b/samples/OAuthResourceServer/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> diff --git a/samples/OAuthServiceProvider/Code/Global.cs b/samples/OAuthServiceProvider/Code/Global.cs index 6f04a55..28db142 100644 --- a/samples/OAuthServiceProvider/Code/Global.cs +++ b/samples/OAuthServiceProvider/Code/Global.cs @@ -4,6 +4,8 @@ using System.ServiceModel; using System.Text; using System.Web; + + using DotNetOpenAuth.Logging; using DotNetOpenAuth.OAuth.Messages; /// <summary> @@ -18,7 +20,7 @@ /// <summary> /// The logger for this sample to use. /// </summary> - public static log4net.ILog Logger = log4net.LogManager.GetLogger("DotNetOpenAuth.OAuthServiceProvider"); + public static ILog Logger = LogProvider.GetLogger("DotNetOpenAuth.OAuthServiceProvider"); private readonly object syncObject = new object(); @@ -97,19 +99,15 @@ } private void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); Logger.Info("Sample starting..."); } private void Application_End(object sender, EventArgs e) { Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); } private void Application_Error(object sender, EventArgs e) { - Logger.Error("An unhandled exception occurred in ASP.NET processing: " + Server.GetLastError(), Server.GetLastError()); + Logger.ErrorException("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; diff --git a/samples/OAuthServiceProvider/Code/OAuthAuthorizationManager.cs b/samples/OAuthServiceProvider/Code/OAuthAuthorizationManager.cs index 2d942b5..8f30f0c 100644 --- a/samples/OAuthServiceProvider/Code/OAuthAuthorizationManager.cs +++ b/samples/OAuthServiceProvider/Code/OAuthAuthorizationManager.cs @@ -9,6 +9,7 @@ using System.ServiceModel.Security; using System.Threading.Tasks; using DotNetOpenAuth; + using DotNetOpenAuth.Logging; using DotNetOpenAuth.OAuth; /// <summary> @@ -56,7 +57,7 @@ } } } catch (ProtocolException ex) { - Global.Logger.Error("Error processing OAuth messages.", ex); + Global.Logger.ErrorException("Error processing OAuth messages.", ex); } return false; diff --git a/samples/OAuthServiceProvider/Code/TracePageAppender.cs b/samples/OAuthServiceProvider/Code/TracePageAppender.cs deleted file mode 100644 index 8f97c89..0000000 --- a/samples/OAuthServiceProvider/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OAuthServiceProvider.Code { - using System; - using System.Collections.Generic; - using System.IO; - using System.Web; - - public class TracePageAppender : log4net.Appender.AppenderSkeleton { - protected override void Append(log4net.Core.LoggingEvent loggingEvent) { - StringWriter sw = new StringWriter(Global.LogMessages); - Layout.Format(sw, loggingEvent); - } - } -}
\ No newline at end of file diff --git a/samples/OAuthServiceProvider/OAuthServiceProvider.csproj b/samples/OAuthServiceProvider/OAuthServiceProvider.csproj index 1c5b7da..b677fdc 100644 --- a/samples/OAuthServiceProvider/OAuthServiceProvider.csproj +++ b/samples/OAuthServiceProvider/OAuthServiceProvider.csproj @@ -46,10 +46,6 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Data.DataSetExtensions" /> @@ -115,7 +111,6 @@ <Compile Include="Code\OAuthToken.cs" /> <Compile Include="Code\RequestScopedTokenMessage.cs" /> <Compile Include="Code\TokenAuthorizationState.cs" /> - <Compile Include="Code\TracePageAppender.cs" /> <Compile Include="Code\Utilities.cs" /> <Compile Include="Code\DataClasses.designer.cs"> <AutoGen>True</AutoGen> diff --git a/samples/OAuthServiceProvider/packages.config b/samples/OAuthServiceProvider/packages.config index ea83ad2..c6cfe98 100644 --- a/samples/OAuthServiceProvider/packages.config +++ b/samples/OAuthServiceProvider/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> diff --git a/samples/OpenIdOfflineProvider/App.xaml.cs b/samples/OpenIdOfflineProvider/App.xaml.cs index 8fb29e8..481ddb7 100644 --- a/samples/OpenIdOfflineProvider/App.xaml.cs +++ b/samples/OpenIdOfflineProvider/App.xaml.cs @@ -5,29 +5,20 @@ //----------------------------------------------------------------------- namespace DotNetOpenAuth.OpenIdOfflineProvider { - using System; - using System.Collections.Generic; - using System.Configuration; - using System.Data; - using System.Linq; - using System.Windows; - using log4net; - using log4net.Core; + using System.Windows; - /// <summary> + using DotNetOpenAuth.Logging; + + /// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App : Application { - /// <summary> - /// Message logger. - /// </summary> - internal static ILog Logger = log4net.LogManager.GetLogger(typeof(App)); /// <summary> /// Initializes a new instance of the <see cref="App"/> class. /// </summary> public App() { - log4net.Config.XmlConfigurator.Configure(); + LogProvider.SetCurrentLogProvider(new TextWriterLogProvider()); } } } diff --git a/samples/OpenIdOfflineProvider/Controllers/HomeController.cs b/samples/OpenIdOfflineProvider/Controllers/HomeController.cs index 0cf4046..96473b3 100644 --- a/samples/OpenIdOfflineProvider/Controllers/HomeController.cs +++ b/samples/OpenIdOfflineProvider/Controllers/HomeController.cs @@ -13,11 +13,14 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider.Controllers { using System.Threading.Tasks; using System.Web.Http; + using DotNetOpenAuth.Logging; + using Validation; public class HomeController : ApiController { - public HttpResponseMessage Get() { - App.Logger.Info("Discovery on OP Identifier detected."); + private static readonly ILog Logger = LogProvider.GetCurrentClassLogger(); + public HttpResponseMessage Get() { + Logger.Info("Discovery on OP Identifier detected."); var opEndpoint = this.Url.Link("default", new { controller = "provider" }); var opEndpointUri = new Uri(opEndpoint); return new HttpResponseMessage() { diff --git a/samples/OpenIdOfflineProvider/Controllers/ProviderController.cs b/samples/OpenIdOfflineProvider/Controllers/ProviderController.cs index 6487801..6502842 100644 --- a/samples/OpenIdOfflineProvider/Controllers/ProviderController.cs +++ b/samples/OpenIdOfflineProvider/Controllers/ProviderController.cs @@ -15,6 +15,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider.Controllers { using System.Threading.Tasks; using System.Web.Http; + using DotNetOpenAuth.Logging; using DotNetOpenAuth.Messaging.Bindings; using DotNetOpenAuth.OpenId; using DotNetOpenAuth.OpenId.Provider; @@ -22,6 +23,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider.Controllers { public class ProviderController : ApiController { private static readonly ICryptoKeyAndNonceStore store = new MemoryCryptoKeyAndNonceStore(); + private static readonly ILog Logger = LogProvider.GetCurrentClassLogger(); private MainWindow MainWindow { get { return MainWindow.Instance; } } @@ -38,7 +40,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider.Controllers { var provider = new OpenIdProvider(store); IRequest request = await provider.GetRequestAsync(this.Request); if (request == null) { - App.Logger.Error("A request came in that did not carry an OpenID message."); + Logger.Error("A request came in that did not carry an OpenID message."); return new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent("<html><body>This is an OpenID Provider endpoint.</body></html>", Encoding.UTF8, "text/html"), }; diff --git a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs index dc3a500..ec5bfff 100644 --- a/samples/OpenIdOfflineProvider/MainWindow.xaml.cs +++ b/samples/OpenIdOfflineProvider/MainWindow.xaml.cs @@ -5,42 +5,26 @@ //----------------------------------------------------------------------- namespace DotNetOpenAuth.OpenIdOfflineProvider { - using System; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.IO; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Runtime.InteropServices; - using System.ServiceModel; - using System.Text; - using System.Threading; - using System.Threading.Tasks; - using System.Web; - using System.Web.Http; - using System.Web.Http.Routing; - using System.Web.Http.SelfHost; - using System.Windows; - using System.Windows.Controls; - using System.Windows.Data; - using System.Windows.Documents; - using System.Windows.Input; - using System.Windows.Media; - using System.Windows.Media.Imaging; - using System.Windows.Navigation; - using System.Windows.Shapes; - using DotNetOpenAuth.Messaging; - using DotNetOpenAuth.OpenId; - using DotNetOpenAuth.OpenId.Provider; - using log4net; - using log4net.Appender; - using log4net.Core; - using Validation; - - /// <summary> + using System; + using System.ComponentModel; + using System.Globalization; + using System.Linq; + using System.Net; + using System.Net.Http.Headers; + using System.Runtime.InteropServices; + using System.ServiceModel; + using System.Threading.Tasks; + using System.Web; + using System.Web.Http; + using System.Web.Http.SelfHost; + using System.Windows; + using System.Windows.Input; + + using DotNetOpenAuth.Logging; + + using Validation; + + /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window, IDisposable { @@ -52,7 +36,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { /// <summary> /// The logger the application may use. /// </summary> - private ILog logger = log4net.LogManager.GetLogger(typeof(MainWindow)); + private ILog logger = LogProvider.GetLogger(typeof(MainWindow)); /// <summary> /// The HTTP listener that acts as the OpenID Provider socket. @@ -64,10 +48,10 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { /// </summary> public MainWindow() { this.InitializeComponent(); - TextWriterAppender boxLogger = log4net.LogManager.GetRepository().GetAppenders().OfType<TextWriterAppender>().FirstOrDefault(a => a.Name == "TextBoxAppender"); - if (boxLogger != null) { - boxLogger.Writer = new TextBoxTextWriter(this.logBox); - } + //TextWriterLogProvider.TextWriterLogger boxLogger = LogProvider.GetRepository().GetAppenders().OfType<TextWriterAppender>().FirstOrDefault(a => a.Name == "TextBoxAppender"); + //if (boxLogger != null) { + // boxLogger.Writer = new TextBoxTextWriter(this.logBox); + //} Instance = this; this.StartProviderAsync(); @@ -102,7 +86,7 @@ namespace DotNetOpenAuth.OpenIdOfflineProvider { /// Raises the <see cref="E:Closing"/> event. /// </summary> /// <param name="e">The <see cref="System.ComponentModel.CancelEventArgs"/> instance containing the event data.</param> - protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { + protected override void OnClosing(CancelEventArgs e) { this.StopProviderAsync(); base.OnClosing(e); } diff --git a/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj b/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj index 232cacd..a2627af 100644 --- a/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj +++ b/samples/OpenIdOfflineProvider/OpenIdOfflineProvider.csproj @@ -61,10 +61,6 @@ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="Newtonsoft.Json"> <HintPath>..\..\src\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath> </Reference> @@ -131,6 +127,7 @@ <Compile Include="Controllers\HomeController.cs" /> <Compile Include="Controllers\ProviderController.cs" /> <Compile Include="Controllers\UserController.cs" /> + <Compile Include="TextLogProvider.cs" /> <Page Include="CheckIdWindow.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> diff --git a/samples/OpenIdOfflineProvider/TextLogProvider.cs b/samples/OpenIdOfflineProvider/TextLogProvider.cs new file mode 100644 index 0000000..84be699 --- /dev/null +++ b/samples/OpenIdOfflineProvider/TextLogProvider.cs @@ -0,0 +1,153 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Diagnostics; +using System.IO; +using System.Reflection; +using System.Runtime.Remoting.Messaging; +using System.ServiceModel.Dispatcher; + +using DotNetOpenAuth.Logging; +using DotNetOpenAuth.Logging.LogProviders; +using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; + +namespace DotNetOpenAuth.OpenIdOfflineProvider { + + /// <summary> + /// Sends logging events to a <see cref="TextWriter"/>. + /// </summary> + /// <remarks> + /// <para> + /// An Appender that writes to a <see cref="TextWriter"/>. + /// </para> + /// <para> + /// This appender may be used stand alone if initialized with an appropriate + /// writer, however it is typically used as a base class for an appender that + /// can open a <see cref="TextWriter"/> to write to. + /// </para> + /// </remarks> + /// <author>Nicko Cadell</author> + /// <author>Gert Driesen</author> + /// <author>Douglas de la Torre</author> + public class TextWriterLogProvider : ILogProvider { + public class TextWriterLogger : ILog { + private const string LogSystem = "LibLog"; + + private readonly string _category; + private readonly WriteDelegate _logWriteDelegate; + private readonly int _skipLevel; + + internal TextWriterLogger(string category, WriteDelegate logWriteDelegate) { + _category = category; + _logWriteDelegate = logWriteDelegate; + _skipLevel = 1; + } + + public bool Log(LogLevel logLevel, Func<string> messageFunc, Exception exception) { + if (messageFunc == null) { + //nothing to log.. + return true; + } + + _logWriteDelegate((int)ToLogMessageSeverity(logLevel), LogSystem, _skipLevel, exception, true, 0, null, + _category, null, messageFunc.Invoke()); + + return true; + } + + public TraceEventType ToLogMessageSeverity(LogLevel logLevel) { + switch (logLevel) { + case LogLevel.Trace: + return TraceEventType.Verbose; + case LogLevel.Debug: + return TraceEventType.Verbose; + case LogLevel.Info: + return TraceEventType.Information; + case LogLevel.Warn: + return TraceEventType.Warning; + case LogLevel.Error: + return TraceEventType.Error; + case LogLevel.Fatal: + return TraceEventType.Critical; + default: + throw new ArgumentOutOfRangeException("logLevel"); + } + } + + /// <summary> + /// The form of the Loupe Log.Write method we're using + /// </summary> + internal delegate void WriteDelegate( + int severity, + string logSystem, + int skipFrames, + Exception exception, + bool attributeToException, + int writeMode, + string detailsXml, + string category, + string caption, + string description, + params object[] args + ); + } + + private static bool _providerIsAvailableOverride = true; + private readonly TextWriterLogger.WriteDelegate _logWriteDelegate; + + public TextWriterLogProvider() + { + if (!IsLoggerAvailable()) + { + throw new InvalidOperationException("Gibraltar.Agent.Log (Loupe) not found"); + } + + _logWriteDelegate = GetLogWriteDelegate(); + } + + /// <summary> + /// Gets or sets a value indicating whether [provider is available override]. Used in tests. + /// </summary> + /// <value> + /// <c>true</c> if [provider is available override]; otherwise, <c>false</c>. + /// </value> + public static bool ProviderIsAvailableOverride + { + get { return _providerIsAvailableOverride; } + set { _providerIsAvailableOverride = value; } + } + + public ILog GetLogger(string name) + { + return new TextWriterLogProvider.TextWriterLogger(name, _logWriteDelegate); + } + + public static bool IsLoggerAvailable() + { + return ProviderIsAvailableOverride && GetLogManagerType() != null; + } + + private static Type GetLogManagerType() + { + return Type.GetType("Gibraltar.Agent.Log, Gibraltar.Agent"); + } + + private static TextWriterLogger.WriteDelegate GetLogWriteDelegate() + { + Type logManagerType = GetLogManagerType(); + Type logMessageSeverityType = Type.GetType("Gibraltar.Agent.LogMessageSeverity, Gibraltar.Agent"); + Type logWriteModeType = Type.GetType("Gibraltar.Agent.LogWriteMode, Gibraltar.Agent"); + + MethodInfo method = logManagerType.GetMethod("Write", new[] + { + logMessageSeverityType, typeof(string), typeof(int), typeof(Exception), typeof(bool), + logWriteModeType, typeof(string), typeof(string), typeof(string), typeof(string), typeof(object[]) + }); + + var callDelegate = (TextWriterLogger.WriteDelegate)Delegate.CreateDelegate(typeof(TextWriterLogger.WriteDelegate), method); + return callDelegate; + } + } +} diff --git a/samples/OpenIdOfflineProvider/packages.config b/samples/OpenIdOfflineProvider/packages.config index b5b1841..a99c31f 100644 --- a/samples/OpenIdOfflineProvider/packages.config +++ b/samples/OpenIdOfflineProvider/packages.config @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="AspNetWebApi.SelfHost" version="4.0.20710.0" targetFramework="net45" /> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.AspNet.WebApi.Client" version="5.0.0" targetFramework="net45" /> <package id="Microsoft.AspNet.WebApi.Core" version="5.0.0" targetFramework="net45" /> <package id="Microsoft.AspNet.WebApi.SelfHost" version="4.0.30506.0" targetFramework="net45" /> diff --git a/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj b/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj index 449dd5d..5795ab1 100644 --- a/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj +++ b/samples/OpenIdProviderMvc/OpenIdProviderMvc.csproj @@ -21,7 +21,7 @@ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{AEA29D4D-396F-47F6-BC81-B58D4B855245}</ProjectGuid> - <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>OpenIdProviderMvc</RootNamespace> diff --git a/samples/OpenIdProviderWebForms/Code/TracePageAppender.cs b/samples/OpenIdProviderWebForms/Code/TracePageAppender.cs deleted file mode 100644 index 1bb7a34..0000000 --- a/samples/OpenIdProviderWebForms/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OpenIdProviderWebForms.Code { - using System; - using System.Collections.Generic; - using System.IO; - using System.Web; - - public class TracePageAppender : log4net.Appender.AppenderSkeleton { - protected override void Append(log4net.Core.LoggingEvent loggingEvent) { - StringWriter sw = new StringWriter(Global.LogMessages); - Layout.Format(sw, loggingEvent); - } - } -} diff --git a/samples/OpenIdProviderWebForms/Global.asax.cs b/samples/OpenIdProviderWebForms/Global.asax.cs index 43b1be6..409b6c4 100644 --- a/samples/OpenIdProviderWebForms/Global.asax.cs +++ b/samples/OpenIdProviderWebForms/Global.asax.cs @@ -10,10 +10,13 @@ namespace OpenIdProviderWebForms { using System.IO; using System.Text; using System.Web; + + using DotNetOpenAuth.Logging; + using OpenIdProviderWebForms.Code; public class Global : System.Web.HttpApplication { - public static log4net.ILog Logger = log4net.LogManager.GetLogger(typeof(Global)); + public static ILog Logger = LogProvider.GetLogger(typeof(Global)); internal static StringBuilder LogMessages = new StringBuilder(); @@ -27,15 +30,11 @@ namespace OpenIdProviderWebForms { } protected void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); Logger.Info("Sample starting..."); } protected void Application_End(object sender, EventArgs e) { Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); } protected void Application_BeginRequest(object sender, EventArgs e) { diff --git a/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj b/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj index a5025f0..5c6fbdb 100644 --- a/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj +++ b/samples/OpenIdProviderWebForms/OpenIdProviderWebForms.csproj @@ -61,10 +61,6 @@ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Data.DataSetExtensions" /> @@ -123,7 +119,6 @@ <Compile Include="Code\InMemoryTokenManager.cs" /> <Compile Include="Code\OAuthHybrid.cs" /> <Compile Include="Code\ReadOnlyXmlMembershipProvider.cs" /> - <Compile Include="Code\TracePageAppender.cs" /> <Compile Include="Code\Util.cs" /> <Compile Include="decide.aspx.cs"> <DependentUpon>decide.aspx</DependentUpon> diff --git a/samples/OpenIdProviderWebForms/packages.config b/samples/OpenIdProviderWebForms/packages.config index ea83ad2..c6cfe98 100644 --- a/samples/OpenIdProviderWebForms/packages.config +++ b/samples/OpenIdProviderWebForms/packages.config @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> diff --git a/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj b/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj index 749752a..eff1b4f 100644 --- a/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj +++ b/samples/OpenIdRelyingPartyMvc/OpenIdRelyingPartyMvc.csproj @@ -21,7 +21,7 @@ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{07B193F1-68AD-4E9C-98AF-BEFB5E9403CB}</ProjectGuid> - <ProjectTypeGuids>{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> + <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>OpenIdRelyingPartyMvc</RootNamespace> diff --git a/samples/OpenIdRelyingPartyWebForms/.gitignore b/samples/OpenIdRelyingPartyWebForms/.gitignore deleted file mode 100644 index b086a60..0000000 --- a/samples/OpenIdRelyingPartyWebForms/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -Bin -obj -*.user -*.log -StyleCop.Cache diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs b/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs deleted file mode 100644 index 44b237d..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStore.cs +++ /dev/null @@ -1,139 +0,0 @@ -//----------------------------------------------------------------------- -// <copyright file="CustomStore.cs" company="Outercurve Foundation"> -// Copyright (c) Outercurve Foundation. All rights reserved. -// </copyright> -//----------------------------------------------------------------------- - -namespace OpenIdRelyingPartyWebForms.Code { - using System; - using System.Collections.Generic; - using System.Data; - using System.Globalization; - using System.Linq; - using DotNetOpenAuth; - using DotNetOpenAuth.Configuration; - using DotNetOpenAuth.Messaging.Bindings; - using DotNetOpenAuth.OpenId; - - /// <summary> - /// This custom store serializes all elements to demonstrate peristent and/or shared storage. - /// This is common in a web farm, for example. - /// </summary> - /// <remarks> - /// This doesn't actually serialize anything to a persistent store, so restarting the web server - /// will still clear everything this store is supposed to remember. - /// But we "persist" all associations and nonces into a DataTable to demonstrate - /// that using a database is possible. - /// </remarks> - public class CustomStore : ICryptoKeyAndNonceStore { - private static CustomStoreDataSet dataSet = new CustomStoreDataSet(); - - #region INonceStore Members - - /// <summary> - /// Stores a given nonce and timestamp. - /// </summary> - /// <param name="context">The context, or namespace, within which the - /// <paramref name="nonce"/> must be unique. - /// The context SHOULD be treated as case-sensitive. - /// The value will never be <c>null</c> but may be the empty string.</param> - /// <param name="nonce">A series of random characters.</param> - /// <param name="timestampUtc">The timestamp that together with the nonce string make it unique. - /// The timestamp may also be used by the data store to clear out old nonces.</param> - /// <returns> - /// True if the nonce+timestamp (combination) was not previously in the database. - /// False if the nonce was stored previously with the same timestamp. - /// </returns> - /// <remarks> - /// The nonce must be stored for no less than the maximum time window a message may - /// be processed within before being discarded as an expired message. - /// If the binding element is applicable to your channel, this expiration window - /// is retrieved or set using the - /// <see cref="StandardExpirationBindingElement.MaximumMessageAge"/> property. - /// </remarks> - public bool StoreNonce(string context, string nonce, DateTime timestampUtc) { - // IMPORTANT: If actually persisting to a database that can be reached from - // different servers/instances of this class at once, it is vitally important - // to protect against race condition attacks by one or more of these: - // 1) setting a UNIQUE constraint on the nonce CODE in the SQL table - // 2) Using a transaction with repeatable reads to guarantee that a check - // that verified a nonce did not exist will prevent that nonce from being - // added by another process while this process is adding it. - // And then you'll want to catch the exception that the SQL database can throw - // at you in the result of a race condition somewhere in your web site UI code - // and display some message to have the user try to log in again, and possibly - // warn them about a replay attack. - lock (this) { - if (dataSet.Nonce.FindByIssuedUtcCodeContext(timestampUtc, nonce, context) != null) { - return false; - } - - TimeSpan maxMessageAge = DotNetOpenAuthSection.Messaging.MaximumMessageLifetime; - dataSet.Nonce.AddNonceRow(context, nonce, timestampUtc, timestampUtc + maxMessageAge); - return true; - } - } - - public void ClearExpiredNonces() { - this.removeExpiredRows(dataSet.Nonce, dataSet.Nonce.ExpiresUtcColumn.ColumnName); - } - - #endregion - - #region ICryptoKeyStore Members - - public CryptoKey GetKey(string bucket, string handle) { - var assocRow = dataSet.CryptoKey.FindByBucketHandle(bucket, handle); - return assocRow == null ? null : new CryptoKey(assocRow.Secret, assocRow.ExpiresUtc); - } - - public IEnumerable<KeyValuePair<string, CryptoKey>> GetKeys(string bucket) { - // properly escape the URL to prevent injection attacks. - string value = bucket.Replace("'", "''"); - string filter = string.Format( - CultureInfo.InvariantCulture, - "{0} = '{1}'", - dataSet.CryptoKey.BucketColumn.ColumnName, - value); - string sort = dataSet.CryptoKey.ExpiresUtcColumn.ColumnName + " DESC"; - DataView view = new DataView(dataSet.CryptoKey, filter, sort, DataViewRowState.CurrentRows); - if (view.Count == 0) { - yield break; - } - - foreach (CustomStoreDataSet.CryptoKeyRow row in view.Cast<DataRowView>().Select(rv => rv.Row)) { - yield return new KeyValuePair<string, CryptoKey>(row.Handle, new CryptoKey(row.Secret, row.ExpiresUtc)); - } - } - - public void StoreKey(string bucket, string handle, CryptoKey key) { - var cryptoKeyRow = dataSet.CryptoKey.NewCryptoKeyRow(); - cryptoKeyRow.Bucket = bucket; - cryptoKeyRow.Handle = handle; - cryptoKeyRow.ExpiresUtc = key.ExpiresUtc; - cryptoKeyRow.Secret = key.Key; - dataSet.CryptoKey.AddCryptoKeyRow(cryptoKeyRow); - } - - public void RemoveKey(string bucket, string handle) { - var row = dataSet.CryptoKey.FindByBucketHandle(bucket, handle); - if (row != null) { - dataSet.CryptoKey.RemoveCryptoKeyRow(row); - } - } - - #endregion - - internal void ClearExpiredSecrets() { - this.removeExpiredRows(dataSet.CryptoKey, dataSet.CryptoKey.ExpiresUtcColumn.ColumnName); - } - - private void removeExpiredRows(DataTable table, string expiredColumnName) { - string filter = string.Format(CultureInfo.InvariantCulture, "{0} < #{1}#", expiredColumnName, DateTime.UtcNow); - DataView view = new DataView(table, filter, null, DataViewRowState.CurrentRows); - for (int i = view.Count - 1; i >= 0; i--) { - view.Delete(i); - } - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.Designer.cs b/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.Designer.cs deleted file mode 100644 index beacfc4..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.Designer.cs +++ /dev/null @@ -1,976 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// This code was generated by a tool. -// Runtime Version:2.0.50727.3053 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </auto-generated> -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 - -namespace OpenIdRelyingPartyWebForms { - - - /// <summary> - ///Represents a strongly typed in-memory cache of data. - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - [global::System.Serializable()] - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] - [global::System.Xml.Serialization.XmlRootAttribute("CustomStoreDataSet")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] - public partial class CustomStoreDataSet : global::System.Data.DataSet { - - private AssociationDataTable tableAssociation; - - private NonceDataTable tableNonce; - - private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public CustomStoreDataSet() { - this.BeginInit(); - this.InitClass(); - global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - base.Tables.CollectionChanged += schemaChangedHandler; - base.Relations.CollectionChanged += schemaChangedHandler; - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected CustomStoreDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context, false) { - if ((this.IsBinarySerialized(info, context) == true)) { - this.InitVars(false); - global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - this.Tables.CollectionChanged += schemaChangedHandler1; - this.Relations.CollectionChanged += schemaChangedHandler1; - return; - } - string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); - if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { - global::System.Data.DataSet ds = new global::System.Data.DataSet(); - ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); - if ((ds.Tables["Association"] != null)) { - base.Tables.Add(new AssociationDataTable(ds.Tables["Association"])); - } - if ((ds.Tables["Nonce"] != null)) { - base.Tables.Add(new NonceDataTable(ds.Tables["Nonce"])); - } - this.DataSetName = ds.DataSetName; - this.Prefix = ds.Prefix; - this.Namespace = ds.Namespace; - this.Locale = ds.Locale; - this.CaseSensitive = ds.CaseSensitive; - this.EnforceConstraints = ds.EnforceConstraints; - this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); - this.InitVars(); - } - else { - this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); - } - this.GetSerializationData(info, context); - global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - base.Tables.CollectionChanged += schemaChangedHandler; - this.Relations.CollectionChanged += schemaChangedHandler; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public AssociationDataTable Association { - get { - return this.tableAssociation; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public NonceDataTable Nonce { - get { - return this.tableNonce; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.BrowsableAttribute(true)] - [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] - public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { - get { - return this._schemaSerializationMode; - } - set { - this._schemaSerializationMode = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] - public new global::System.Data.DataTableCollection Tables { - get { - return base.Tables; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] - public new global::System.Data.DataRelationCollection Relations { - get { - return base.Relations; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void InitializeDerivedDataSet() { - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public override global::System.Data.DataSet Clone() { - CustomStoreDataSet cln = ((CustomStoreDataSet)(base.Clone())); - cln.InitVars(); - cln.SchemaSerializationMode = this.SchemaSerializationMode; - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override bool ShouldSerializeTables() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override bool ShouldSerializeRelations() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { - if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { - this.Reset(); - global::System.Data.DataSet ds = new global::System.Data.DataSet(); - ds.ReadXml(reader); - if ((ds.Tables["Association"] != null)) { - base.Tables.Add(new AssociationDataTable(ds.Tables["Association"])); - } - if ((ds.Tables["Nonce"] != null)) { - base.Tables.Add(new NonceDataTable(ds.Tables["Nonce"])); - } - this.DataSetName = ds.DataSetName; - this.Prefix = ds.Prefix; - this.Namespace = ds.Namespace; - this.Locale = ds.Locale; - this.CaseSensitive = ds.CaseSensitive; - this.EnforceConstraints = ds.EnforceConstraints; - this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); - this.InitVars(); - } - else { - this.ReadXml(reader); - this.InitVars(); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { - global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); - this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); - stream.Position = 0; - return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars() { - this.InitVars(true); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars(bool initTable) { - this.tableAssociation = ((AssociationDataTable)(base.Tables["Association"])); - if ((initTable == true)) { - if ((this.tableAssociation != null)) { - this.tableAssociation.InitVars(); - } - } - this.tableNonce = ((NonceDataTable)(base.Tables["Nonce"])); - if ((initTable == true)) { - if ((this.tableNonce != null)) { - this.tableNonce.InitVars(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void InitClass() { - this.DataSetName = "CustomStoreDataSet"; - this.Prefix = ""; - this.Namespace = "http://tempuri.org/CustomStoreDataSet.xsd"; - this.EnforceConstraints = true; - this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; - this.tableAssociation = new AssociationDataTable(); - base.Tables.Add(this.tableAssociation); - this.tableNonce = new NonceDataTable(); - base.Tables.Add(this.tableNonce); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - private bool ShouldSerializeAssociation() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - private bool ShouldSerializeNonce() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { - if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { - this.InitVars(); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - CustomStoreDataSet ds = new CustomStoreDataSet(); - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); - any.Namespace = ds.Namespace; - sequence.Items.Add(any); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; - } - - public delegate void AssociationRowChangeEventHandler(object sender, AssociationRowChangeEvent e); - - public delegate void NonceRowChangeEventHandler(object sender, NonceRowChangeEvent e); - - /// <summary> - ///Represents the strongly named DataTable class. - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class AssociationDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { - - private global::System.Data.DataColumn columnDistinguishingFactor; - - private global::System.Data.DataColumn columnHandle; - - private global::System.Data.DataColumn columnExpires; - - private global::System.Data.DataColumn columnPrivateData; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationDataTable() { - this.TableName = "Association"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal AssociationDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; - } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; - } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected AssociationDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataColumn DistinguishingFactorColumn { - get { - return this.columnDistinguishingFactor; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataColumn HandleColumn { - get { - return this.columnHandle; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataColumn ExpiresColumn { - get { - return this.columnExpires; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataColumn PrivateDataColumn { - get { - return this.columnPrivateData; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.Browsable(false)] - public int Count { - get { - return this.Rows.Count; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationRow this[int index] { - get { - return ((AssociationRow)(this.Rows[index])); - } - } - - public event AssociationRowChangeEventHandler AssociationRowChanging; - - public event AssociationRowChangeEventHandler AssociationRowChanged; - - public event AssociationRowChangeEventHandler AssociationRowDeleting; - - public event AssociationRowChangeEventHandler AssociationRowDeleted; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void AddAssociationRow(AssociationRow row) { - this.Rows.Add(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationRow AddAssociationRow(string DistinguishingFactor, string Handle, System.DateTime Expires, byte[] PrivateData) { - AssociationRow rowAssociationRow = ((AssociationRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - DistinguishingFactor, - Handle, - Expires, - PrivateData}; - rowAssociationRow.ItemArray = columnValuesArray; - this.Rows.Add(rowAssociationRow); - return rowAssociationRow; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationRow FindByDistinguishingFactorHandle(string DistinguishingFactor, string Handle) { - return ((AssociationRow)(this.Rows.Find(new object[] { - DistinguishingFactor, - Handle}))); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public virtual global::System.Collections.IEnumerator GetEnumerator() { - return this.Rows.GetEnumerator(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public override global::System.Data.DataTable Clone() { - AssociationDataTable cln = ((AssociationDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Data.DataTable CreateInstance() { - return new AssociationDataTable(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars() { - this.columnDistinguishingFactor = base.Columns["DistinguishingFactor"]; - this.columnHandle = base.Columns["Handle"]; - this.columnExpires = base.Columns["Expires"]; - this.columnPrivateData = base.Columns["PrivateData"]; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void InitClass() { - this.columnDistinguishingFactor = new global::System.Data.DataColumn("DistinguishingFactor", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnDistinguishingFactor); - this.columnHandle = new global::System.Data.DataColumn("Handle", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnHandle); - this.columnExpires = new global::System.Data.DataColumn("Expires", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnExpires); - this.columnPrivateData = new global::System.Data.DataColumn("PrivateData", typeof(byte[]), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnPrivateData); - this.Constraints.Add(new global::System.Data.UniqueConstraint("PrimaryKey", new global::System.Data.DataColumn[] { - this.columnDistinguishingFactor, - this.columnHandle}, true)); - this.columnDistinguishingFactor.AllowDBNull = false; - this.columnHandle.AllowDBNull = false; - this.columnExpires.AllowDBNull = false; - this.columnPrivateData.AllowDBNull = false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationRow NewAssociationRow() { - return ((AssociationRow)(this.NewRow())); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new AssociationRow(builder); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Type GetRowType() { - return typeof(AssociationRow); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.AssociationRowChanged != null)) { - this.AssociationRowChanged(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.AssociationRowChanging != null)) { - this.AssociationRowChanging(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.AssociationRowDeleted != null)) { - this.AssociationRowDeleted(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.AssociationRowDeleting != null)) { - this.AssociationRowDeleting(this, new AssociationRowChangeEvent(((AssociationRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void RemoveAssociationRow(AssociationRow row) { - this.Rows.Remove(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - CustomStoreDataSet ds = new CustomStoreDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "AssociationDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; - } - } - - /// <summary> - ///Represents the strongly named DataTable class. - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class NonceDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { - - private global::System.Data.DataColumn columnCode; - - private global::System.Data.DataColumn columnExpires; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceDataTable() { - this.TableName = "Nonce"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal NonceDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; - } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; - } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected NonceDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataColumn CodeColumn { - get { - return this.columnCode; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataColumn ExpiresColumn { - get { - return this.columnExpires; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.ComponentModel.Browsable(false)] - public int Count { - get { - return this.Rows.Count; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceRow this[int index] { - get { - return ((NonceRow)(this.Rows[index])); - } - } - - public event NonceRowChangeEventHandler NonceRowChanging; - - public event NonceRowChangeEventHandler NonceRowChanged; - - public event NonceRowChangeEventHandler NonceRowDeleting; - - public event NonceRowChangeEventHandler NonceRowDeleted; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void AddNonceRow(NonceRow row) { - this.Rows.Add(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceRow AddNonceRow(string Code, System.DateTime Expires) { - NonceRow rowNonceRow = ((NonceRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - Code, - Expires}; - rowNonceRow.ItemArray = columnValuesArray; - this.Rows.Add(rowNonceRow); - return rowNonceRow; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceRow FindByCode(string Code) { - return ((NonceRow)(this.Rows.Find(new object[] { - Code}))); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public virtual global::System.Collections.IEnumerator GetEnumerator() { - return this.Rows.GetEnumerator(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public override global::System.Data.DataTable Clone() { - NonceDataTable cln = ((NonceDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Data.DataTable CreateInstance() { - return new NonceDataTable(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars() { - this.columnCode = base.Columns["Code"]; - this.columnExpires = base.Columns["Expires"]; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void InitClass() { - this.columnCode = new global::System.Data.DataColumn("Code", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnCode); - this.columnExpires = new global::System.Data.DataColumn("Expires", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnExpires); - this.Constraints.Add(new global::System.Data.UniqueConstraint("PrimaryKey", new global::System.Data.DataColumn[] { - this.columnCode}, true)); - this.columnCode.AllowDBNull = false; - this.columnCode.Unique = true; - this.columnExpires.AllowDBNull = false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceRow NewNonceRow() { - return ((NonceRow)(this.NewRow())); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new NonceRow(builder); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override global::System.Type GetRowType() { - return typeof(NonceRow); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.NonceRowChanged != null)) { - this.NonceRowChanged(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.NonceRowChanging != null)) { - this.NonceRowChanging(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.NonceRowDeleted != null)) { - this.NonceRowDeleted(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.NonceRowDeleting != null)) { - this.NonceRowDeleting(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void RemoveNonceRow(NonceRow row) { - this.Rows.Remove(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - CustomStoreDataSet ds = new CustomStoreDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "NonceDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; - } - } - - /// <summary> - ///Represents strongly named DataRow class. - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - public partial class AssociationRow : global::System.Data.DataRow { - - private AssociationDataTable tableAssociation; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal AssociationRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableAssociation = ((AssociationDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string DistinguishingFactor { - get { - return ((string)(this[this.tableAssociation.DistinguishingFactorColumn])); - } - set { - this[this.tableAssociation.DistinguishingFactorColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string Handle { - get { - return ((string)(this[this.tableAssociation.HandleColumn])); - } - set { - this[this.tableAssociation.HandleColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public System.DateTime Expires { - get { - return ((global::System.DateTime)(this[this.tableAssociation.ExpiresColumn])); - } - set { - this[this.tableAssociation.ExpiresColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public byte[] PrivateData { - get { - return ((byte[])(this[this.tableAssociation.PrivateDataColumn])); - } - set { - this[this.tableAssociation.PrivateDataColumn] = value; - } - } - } - - /// <summary> - ///Represents strongly named DataRow class. - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - public partial class NonceRow : global::System.Data.DataRow { - - private NonceDataTable tableNonce; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal NonceRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableNonce = ((NonceDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string Code { - get { - return ((string)(this[this.tableNonce.CodeColumn])); - } - set { - this[this.tableNonce.CodeColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public System.DateTime Expires { - get { - return ((global::System.DateTime)(this[this.tableNonce.ExpiresColumn])); - } - set { - this[this.tableNonce.ExpiresColumn] = value; - } - } - } - - /// <summary> - ///Row event argument class - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - public class AssociationRowChangeEvent : global::System.EventArgs { - - private AssociationRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationRowChangeEvent(AssociationRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AssociationRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// <summary> - ///Row event argument class - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - public class NonceRowChangeEvent : global::System.EventArgs { - - private NonceRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceRowChangeEvent(NonceRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public NonceRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - } -} - -#pragma warning restore 1591
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.cs b/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.cs deleted file mode 100644 index abc77e9..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace OpenIdRelyingPartyWebForms.Code { - public partial class CustomStoreDataSet { - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xsc b/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xsc deleted file mode 100644 index 05b0199..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xsc +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!--<autogenerated> - This code was generated by a tool. - Changes to this file may cause incorrect behavior and will be lost if - the code is regenerated. -</autogenerated>--> -<DataSetUISetting Version="1.00" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> - <TableUISettings /> -</DataSetUISetting>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xsd b/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xsd deleted file mode 100644 index f3270f6..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xsd +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xs:schema id="CustomStoreDataSet" targetNamespace="http://tempuri.org/CustomStoreDataSet.xsd" xmlns:mstns="http://tempuri.org/CustomStoreDataSet.xsd" xmlns="http://tempuri.org/CustomStoreDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified"> - <xs:annotation> - <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource"> - <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> - <Connections /> - <Tables /> - <Sources /> - </DataSource> - </xs:appinfo> - </xs:annotation> - <xs:element name="CustomStoreDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="CustomStoreDataSet" msprop:Generator_UserDSName="CustomStoreDataSet"> - <xs:complexType> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element name="CryptoKey" msprop:Generator_UserTableName="CryptoKey" msprop:Generator_RowEvArgName="CryptoKeyRowChangeEvent" msprop:Generator_TableVarName="tableCryptoKey" msprop:Generator_TablePropName="CryptoKey" msprop:Generator_RowDeletingName="CryptoKeyRowDeleting" msprop:Generator_RowChangingName="CryptoKeyRowChanging" msprop:Generator_RowDeletedName="CryptoKeyRowDeleted" msprop:Generator_TableClassName="CryptoKeyDataTable" msprop:Generator_RowChangedName="CryptoKeyRowChanged" msprop:Generator_RowEvHandlerName="CryptoKeyRowChangeEventHandler" msprop:Generator_RowClassName="CryptoKeyRow"> - <xs:complexType> - <xs:sequence> - <xs:element name="Bucket" msprop:Generator_ColumnVarNameInTable="columnBucket" msprop:Generator_ColumnPropNameInRow="Bucket" msprop:Generator_ColumnPropNameInTable="BucketColumn" msprop:Generator_UserColumnName="Bucket" type="xs:string" /> - <xs:element name="Handle" msprop:Generator_ColumnVarNameInTable="columnHandle" msprop:Generator_ColumnPropNameInRow="Handle" msprop:Generator_ColumnPropNameInTable="HandleColumn" msprop:Generator_UserColumnName="Handle" type="xs:string" /> - <xs:element name="ExpiresUtc" msdata:DateTimeMode="Utc" msprop:Generator_ColumnVarNameInTable="columnExpiresUtc" msprop:Generator_ColumnPropNameInRow="ExpiresUtc" msprop:Generator_ColumnPropNameInTable="ExpiresUtcColumn" msprop:Generator_UserColumnName="ExpiresUtc" type="xs:dateTime" /> - <xs:element name="Secret" msprop:Generator_ColumnVarNameInTable="columnSecret" msprop:Generator_ColumnPropNameInRow="Secret" msprop:Generator_ColumnPropNameInTable="SecretColumn" msprop:Generator_UserColumnName="Secret" type="xs:base64Binary" /> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="Nonce" msprop:Generator_UserTableName="Nonce" msprop:Generator_RowEvArgName="NonceRowChangeEvent" msprop:Generator_TableVarName="tableNonce" msprop:Generator_TablePropName="Nonce" msprop:Generator_RowDeletingName="NonceRowDeleting" msprop:Generator_RowChangingName="NonceRowChanging" msprop:Generator_RowDeletedName="NonceRowDeleted" msprop:Generator_TableClassName="NonceDataTable" msprop:Generator_RowChangedName="NonceRowChanged" msprop:Generator_RowEvHandlerName="NonceRowChangeEventHandler" msprop:Generator_RowClassName="NonceRow"> - <xs:complexType> - <xs:sequence> - <xs:element name="Context" msprop:Generator_ColumnVarNameInTable="columnContext" msprop:Generator_ColumnPropNameInRow="Context" msprop:Generator_ColumnPropNameInTable="ContextColumn" msprop:Generator_UserColumnName="Context" type="xs:string" /> - <xs:element name="Code" msprop:Generator_ColumnVarNameInTable="columnCode" msprop:Generator_ColumnPropNameInRow="Code" msprop:Generator_ColumnPropNameInTable="CodeColumn" msprop:Generator_UserColumnName="Code" type="xs:string" /> - <xs:element name="IssuedUtc" msdata:DateTimeMode="Utc" msprop:Generator_ColumnVarNameInTable="columnIssuedUtc" msprop:Generator_ColumnPropNameInRow="IssuedUtc" msprop:Generator_ColumnPropNameInTable="IssuedUtcColumn" msprop:Generator_UserColumnName="IssuedUtc" type="xs:dateTime" /> - <xs:element name="ExpiresUtc" msdata:DateTimeMode="Utc" msprop:Generator_ColumnVarNameInTable="columnExpiresUtc" msprop:Generator_ColumnPropNameInRow="ExpiresUtc" msprop:Generator_ColumnPropNameInTable="ExpiresUtcColumn" msprop:Generator_UserColumnName="ExpiresUtc" type="xs:dateTime" /> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:choice> - </xs:complexType> - <xs:unique name="PrimaryKey" msdata:PrimaryKey="true"> - <xs:selector xpath=".//mstns:CryptoKey" /> - <xs:field xpath="mstns:Bucket" /> - <xs:field xpath="mstns:Handle" /> - </xs:unique> - <xs:unique name="Constraint1" msdata:PrimaryKey="true"> - <xs:selector xpath=".//mstns:Nonce" /> - <xs:field xpath="mstns:IssuedUtc" /> - <xs:field xpath="mstns:Code" /> - <xs:field xpath="mstns:Context" /> - </xs:unique> - </xs:element> -</xs:schema>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xss b/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xss deleted file mode 100644 index 631148e..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet.xss +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!--<autogenerated> - This code was generated by a tool to store the dataset designer's layout information. - Changes to this file may cause incorrect behavior and will be lost if - the code is regenerated. -</autogenerated>--> -<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="-10" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> - <Shapes> - <Shape ID="DesignTable:CryptoKey" ZOrder="2" X="349" Y="83" Height="105" Width="154" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="101" /> - <Shape ID="DesignTable:Nonce" ZOrder="1" X="604" Y="86" Height="125" Width="150" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="121" /> - </Shapes> - <Connectors /> -</DiagramLayout>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet1.Designer.cs b/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet1.Designer.cs deleted file mode 100644 index 3875aa5..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/CustomStoreDataSet1.Designer.cs +++ /dev/null @@ -1,1111 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// This code was generated by a tool. -// Runtime Version:4.0.30319.17614 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </auto-generated> -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 - -namespace OpenIdRelyingPartyWebForms.Code { - - - /// <summary> - ///Represents a strongly typed in-memory cache of data. - ///</summary> - [global::System.Serializable()] - [global::System.ComponentModel.DesignerCategoryAttribute("code")] - [global::System.ComponentModel.ToolboxItem(true)] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] - [global::System.Xml.Serialization.XmlRootAttribute("CustomStoreDataSet")] - [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] - public partial class CustomStoreDataSet : global::System.Data.DataSet { - - private CryptoKeyDataTable tableCryptoKey; - - private NonceDataTable tableNonce; - - private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CustomStoreDataSet() { - this.BeginInit(); - this.InitClass(); - global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - base.Tables.CollectionChanged += schemaChangedHandler; - base.Relations.CollectionChanged += schemaChangedHandler; - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected CustomStoreDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context, false) { - if ((this.IsBinarySerialized(info, context) == true)) { - this.InitVars(false); - global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - this.Tables.CollectionChanged += schemaChangedHandler1; - this.Relations.CollectionChanged += schemaChangedHandler1; - return; - } - string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); - if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { - global::System.Data.DataSet ds = new global::System.Data.DataSet(); - ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); - if ((ds.Tables["CryptoKey"] != null)) { - base.Tables.Add(new CryptoKeyDataTable(ds.Tables["CryptoKey"])); - } - if ((ds.Tables["Nonce"] != null)) { - base.Tables.Add(new NonceDataTable(ds.Tables["Nonce"])); - } - this.DataSetName = ds.DataSetName; - this.Prefix = ds.Prefix; - this.Namespace = ds.Namespace; - this.Locale = ds.Locale; - this.CaseSensitive = ds.CaseSensitive; - this.EnforceConstraints = ds.EnforceConstraints; - this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); - this.InitVars(); - } - else { - this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); - } - this.GetSerializationData(info, context); - global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - base.Tables.CollectionChanged += schemaChangedHandler; - this.Relations.CollectionChanged += schemaChangedHandler; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public CryptoKeyDataTable CryptoKey { - get { - return this.tableCryptoKey; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] - public NonceDataTable Nonce { - get { - return this.tableNonce; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.BrowsableAttribute(true)] - [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] - public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { - get { - return this._schemaSerializationMode; - } - set { - this._schemaSerializationMode = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] - public new global::System.Data.DataTableCollection Tables { - get { - return base.Tables; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] - public new global::System.Data.DataRelationCollection Relations { - get { - return base.Relations; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void InitializeDerivedDataSet() { - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataSet Clone() { - CustomStoreDataSet cln = ((CustomStoreDataSet)(base.Clone())); - cln.InitVars(); - cln.SchemaSerializationMode = this.SchemaSerializationMode; - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override bool ShouldSerializeTables() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override bool ShouldSerializeRelations() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { - if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { - this.Reset(); - global::System.Data.DataSet ds = new global::System.Data.DataSet(); - ds.ReadXml(reader); - if ((ds.Tables["CryptoKey"] != null)) { - base.Tables.Add(new CryptoKeyDataTable(ds.Tables["CryptoKey"])); - } - if ((ds.Tables["Nonce"] != null)) { - base.Tables.Add(new NonceDataTable(ds.Tables["Nonce"])); - } - this.DataSetName = ds.DataSetName; - this.Prefix = ds.Prefix; - this.Namespace = ds.Namespace; - this.Locale = ds.Locale; - this.CaseSensitive = ds.CaseSensitive; - this.EnforceConstraints = ds.EnforceConstraints; - this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); - this.InitVars(); - } - else { - this.ReadXml(reader); - this.InitVars(); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { - global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); - this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); - stream.Position = 0; - return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.InitVars(true); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars(bool initTable) { - this.tableCryptoKey = ((CryptoKeyDataTable)(base.Tables["CryptoKey"])); - if ((initTable == true)) { - if ((this.tableCryptoKey != null)) { - this.tableCryptoKey.InitVars(); - } - } - this.tableNonce = ((NonceDataTable)(base.Tables["Nonce"])); - if ((initTable == true)) { - if ((this.tableNonce != null)) { - this.tableNonce.InitVars(); - } - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitClass() { - this.DataSetName = "CustomStoreDataSet"; - this.Prefix = ""; - this.Namespace = "http://tempuri.org/CustomStoreDataSet.xsd"; - this.EnforceConstraints = true; - this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; - this.tableCryptoKey = new CryptoKeyDataTable(); - base.Tables.Add(this.tableCryptoKey); - this.tableNonce = new NonceDataTable(); - base.Tables.Add(this.tableNonce); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private bool ShouldSerializeCryptoKey() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private bool ShouldSerializeNonce() { - return false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { - if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { - this.InitVars(); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - CustomStoreDataSet ds = new CustomStoreDataSet(); - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); - any.Namespace = ds.Namespace; - sequence.Items.Add(any); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; - } - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public delegate void CryptoKeyRowChangeEventHandler(object sender, CryptoKeyRowChangeEvent e); - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public delegate void NonceRowChangeEventHandler(object sender, NonceRowChangeEvent e); - - /// <summary> - ///Represents the strongly named DataTable class. - ///</summary> - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class CryptoKeyDataTable : global::System.Data.TypedTableBase<CryptoKeyRow> { - - private global::System.Data.DataColumn columnBucket; - - private global::System.Data.DataColumn columnHandle; - - private global::System.Data.DataColumn columnExpiresUtc; - - private global::System.Data.DataColumn columnSecret; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyDataTable() { - this.TableName = "CryptoKey"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal CryptoKeyDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; - } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; - } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected CryptoKeyDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn BucketColumn { - get { - return this.columnBucket; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn HandleColumn { - get { - return this.columnHandle; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ExpiresUtcColumn { - get { - return this.columnExpiresUtc; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn SecretColumn { - get { - return this.columnSecret; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - public int Count { - get { - return this.Rows.Count; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyRow this[int index] { - get { - return ((CryptoKeyRow)(this.Rows[index])); - } - } - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event CryptoKeyRowChangeEventHandler CryptoKeyRowChanging; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event CryptoKeyRowChangeEventHandler CryptoKeyRowChanged; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event CryptoKeyRowChangeEventHandler CryptoKeyRowDeleting; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event CryptoKeyRowChangeEventHandler CryptoKeyRowDeleted; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void AddCryptoKeyRow(CryptoKeyRow row) { - this.Rows.Add(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyRow AddCryptoKeyRow(string Bucket, string Handle, System.DateTime ExpiresUtc, byte[] Secret) { - CryptoKeyRow rowCryptoKeyRow = ((CryptoKeyRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - Bucket, - Handle, - ExpiresUtc, - Secret}; - rowCryptoKeyRow.ItemArray = columnValuesArray; - this.Rows.Add(rowCryptoKeyRow); - return rowCryptoKeyRow; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyRow FindByBucketHandle(string Bucket, string Handle) { - return ((CryptoKeyRow)(this.Rows.Find(new object[] { - Bucket, - Handle}))); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataTable Clone() { - CryptoKeyDataTable cln = ((CryptoKeyDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataTable CreateInstance() { - return new CryptoKeyDataTable(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.columnBucket = base.Columns["Bucket"]; - this.columnHandle = base.Columns["Handle"]; - this.columnExpiresUtc = base.Columns["ExpiresUtc"]; - this.columnSecret = base.Columns["Secret"]; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitClass() { - this.columnBucket = new global::System.Data.DataColumn("Bucket", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnBucket); - this.columnHandle = new global::System.Data.DataColumn("Handle", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnHandle); - this.columnExpiresUtc = new global::System.Data.DataColumn("ExpiresUtc", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnExpiresUtc); - this.columnSecret = new global::System.Data.DataColumn("Secret", typeof(byte[]), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnSecret); - this.Constraints.Add(new global::System.Data.UniqueConstraint("PrimaryKey", new global::System.Data.DataColumn[] { - this.columnBucket, - this.columnHandle}, true)); - this.columnBucket.AllowDBNull = false; - this.columnHandle.AllowDBNull = false; - this.columnExpiresUtc.AllowDBNull = false; - this.columnExpiresUtc.DateTimeMode = global::System.Data.DataSetDateTime.Utc; - this.columnSecret.AllowDBNull = false; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyRow NewCryptoKeyRow() { - return ((CryptoKeyRow)(this.NewRow())); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new CryptoKeyRow(builder); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Type GetRowType() { - return typeof(CryptoKeyRow); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.CryptoKeyRowChanged != null)) { - this.CryptoKeyRowChanged(this, new CryptoKeyRowChangeEvent(((CryptoKeyRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.CryptoKeyRowChanging != null)) { - this.CryptoKeyRowChanging(this, new CryptoKeyRowChangeEvent(((CryptoKeyRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.CryptoKeyRowDeleted != null)) { - this.CryptoKeyRowDeleted(this, new CryptoKeyRowChangeEvent(((CryptoKeyRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.CryptoKeyRowDeleting != null)) { - this.CryptoKeyRowDeleting(this, new CryptoKeyRowChangeEvent(((CryptoKeyRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void RemoveCryptoKeyRow(CryptoKeyRow row) { - this.Rows.Remove(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - CustomStoreDataSet ds = new CustomStoreDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "CryptoKeyDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; - } - } - - /// <summary> - ///Represents the strongly named DataTable class. - ///</summary> - [global::System.Serializable()] - [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class NonceDataTable : global::System.Data.TypedTableBase<NonceRow> { - - private global::System.Data.DataColumn columnContext; - - private global::System.Data.DataColumn columnCode; - - private global::System.Data.DataColumn columnIssuedUtc; - - private global::System.Data.DataColumn columnExpiresUtc; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceDataTable() { - this.TableName = "Nonce"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal NonceDataTable(global::System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; - } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; - } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected NonceDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ContextColumn { - get { - return this.columnContext; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn CodeColumn { - get { - return this.columnCode; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn IssuedUtcColumn { - get { - return this.columnIssuedUtc; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataColumn ExpiresUtcColumn { - get { - return this.columnExpiresUtc; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - [global::System.ComponentModel.Browsable(false)] - public int Count { - get { - return this.Rows.Count; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceRow this[int index] { - get { - return ((NonceRow)(this.Rows[index])); - } - } - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event NonceRowChangeEventHandler NonceRowChanging; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event NonceRowChangeEventHandler NonceRowChanged; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event NonceRowChangeEventHandler NonceRowDeleting; - - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public event NonceRowChangeEventHandler NonceRowDeleted; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void AddNonceRow(NonceRow row) { - this.Rows.Add(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceRow AddNonceRow(string Context, string Code, System.DateTime IssuedUtc, System.DateTime ExpiresUtc) { - NonceRow rowNonceRow = ((NonceRow)(this.NewRow())); - object[] columnValuesArray = new object[] { - Context, - Code, - IssuedUtc, - ExpiresUtc}; - rowNonceRow.ItemArray = columnValuesArray; - this.Rows.Add(rowNonceRow); - return rowNonceRow; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceRow FindByIssuedUtcCodeContext(System.DateTime IssuedUtc, string Code, string Context) { - return ((NonceRow)(this.Rows.Find(new object[] { - IssuedUtc, - Code, - Context}))); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public override global::System.Data.DataTable Clone() { - NonceDataTable cln = ((NonceDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataTable CreateInstance() { - return new NonceDataTable(); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal void InitVars() { - this.columnContext = base.Columns["Context"]; - this.columnCode = base.Columns["Code"]; - this.columnIssuedUtc = base.Columns["IssuedUtc"]; - this.columnExpiresUtc = base.Columns["ExpiresUtc"]; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - private void InitClass() { - this.columnContext = new global::System.Data.DataColumn("Context", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnContext); - this.columnCode = new global::System.Data.DataColumn("Code", typeof(string), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnCode); - this.columnIssuedUtc = new global::System.Data.DataColumn("IssuedUtc", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnIssuedUtc); - this.columnExpiresUtc = new global::System.Data.DataColumn("ExpiresUtc", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); - base.Columns.Add(this.columnExpiresUtc); - this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { - this.columnIssuedUtc, - this.columnCode, - this.columnContext}, true)); - this.columnContext.AllowDBNull = false; - this.columnCode.AllowDBNull = false; - this.columnIssuedUtc.AllowDBNull = false; - this.columnIssuedUtc.DateTimeMode = global::System.Data.DataSetDateTime.Utc; - this.columnExpiresUtc.AllowDBNull = false; - this.columnExpiresUtc.DateTimeMode = global::System.Data.DataSetDateTime.Utc; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceRow NewNonceRow() { - return ((NonceRow)(this.NewRow())); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { - return new NonceRow(builder); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override global::System.Type GetRowType() { - return typeof(NonceRow); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.NonceRowChanged != null)) { - this.NonceRowChanged(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.NonceRowChanging != null)) { - this.NonceRowChanging(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.NonceRowDeleted != null)) { - this.NonceRowDeleted(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.NonceRowDeleting != null)) { - this.NonceRowDeleting(this, new NonceRowChangeEvent(((NonceRow)(e.Row)), e.Action)); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public void RemoveNonceRow(NonceRow row) { - this.Rows.Remove(row); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { - global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); - global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); - CustomStoreDataSet ds = new CustomStoreDataSet(); - global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "NonceDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); - if (xs.Contains(dsSchema.TargetNamespace)) { - global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); - global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); - try { - global::System.Xml.Schema.XmlSchema schema = null; - dsSchema.Write(s1); - for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { - schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); - s2.SetLength(0); - schema.Write(s2); - if ((s1.Length == s2.Length)) { - s1.Position = 0; - s2.Position = 0; - for (; ((s1.Position != s1.Length) - && (s1.ReadByte() == s2.ReadByte())); ) { - ; - } - if ((s1.Position == s1.Length)) { - return type; - } - } - } - } - finally { - if ((s1 != null)) { - s1.Close(); - } - if ((s2 != null)) { - s2.Close(); - } - } - } - xs.Add(dsSchema); - return type; - } - } - - /// <summary> - ///Represents strongly named DataRow class. - ///</summary> - public partial class CryptoKeyRow : global::System.Data.DataRow { - - private CryptoKeyDataTable tableCryptoKey; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal CryptoKeyRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableCryptoKey = ((CryptoKeyDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Bucket { - get { - return ((string)(this[this.tableCryptoKey.BucketColumn])); - } - set { - this[this.tableCryptoKey.BucketColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Handle { - get { - return ((string)(this[this.tableCryptoKey.HandleColumn])); - } - set { - this[this.tableCryptoKey.HandleColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime ExpiresUtc { - get { - return ((global::System.DateTime)(this[this.tableCryptoKey.ExpiresUtcColumn])); - } - set { - this[this.tableCryptoKey.ExpiresUtcColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public byte[] Secret { - get { - return ((byte[])(this[this.tableCryptoKey.SecretColumn])); - } - set { - this[this.tableCryptoKey.SecretColumn] = value; - } - } - } - - /// <summary> - ///Represents strongly named DataRow class. - ///</summary> - public partial class NonceRow : global::System.Data.DataRow { - - private NonceDataTable tableNonce; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - internal NonceRow(global::System.Data.DataRowBuilder rb) : - base(rb) { - this.tableNonce = ((NonceDataTable)(this.Table)); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Context { - get { - return ((string)(this[this.tableNonce.ContextColumn])); - } - set { - this[this.tableNonce.ContextColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public string Code { - get { - return ((string)(this[this.tableNonce.CodeColumn])); - } - set { - this[this.tableNonce.CodeColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime IssuedUtc { - get { - return ((global::System.DateTime)(this[this.tableNonce.IssuedUtcColumn])); - } - set { - this[this.tableNonce.IssuedUtcColumn] = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public System.DateTime ExpiresUtc { - get { - return ((global::System.DateTime)(this[this.tableNonce.ExpiresUtcColumn])); - } - set { - this[this.tableNonce.ExpiresUtcColumn] = value; - } - } - } - - /// <summary> - ///Row event argument class - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class CryptoKeyRowChangeEvent : global::System.EventArgs { - - private CryptoKeyRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyRowChangeEvent(CryptoKeyRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public CryptoKeyRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - - /// <summary> - ///Row event argument class - ///</summary> - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public class NonceRowChangeEvent : global::System.EventArgs { - - private NonceRow eventRow; - - private global::System.Data.DataRowAction eventAction; - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceRowChangeEvent(NonceRow row, global::System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public NonceRow Row { - get { - return this.eventRow; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public global::System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - } -} - -#pragma warning restore 1591
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Code/State.cs b/samples/OpenIdRelyingPartyWebForms/Code/State.cs deleted file mode 100644 index c8cef80..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/State.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System.Web; - using DotNetOpenAuth.OAuth; - using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; - using DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy; - using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - - /// <summary> - /// Strong-typed bag of session state. - /// </summary> - public class State { - public static ClaimsResponse ProfileFields { - get { return HttpContext.Current.Session["ProfileFields"] as ClaimsResponse; } - set { HttpContext.Current.Session["ProfileFields"] = value; } - } - - public static FetchResponse FetchResponse { - get { return HttpContext.Current.Session["FetchResponse"] as FetchResponse; } - set { HttpContext.Current.Session["FetchResponse"] = value; } - } - - public static string FriendlyLoginName { - get { return HttpContext.Current.Session["FriendlyUsername"] as string; } - set { HttpContext.Current.Session["FriendlyUsername"] = value; } - } - - public static PolicyResponse PapePolicies { - get { return HttpContext.Current.Session["PapePolicies"] as PolicyResponse; } - set { HttpContext.Current.Session["PapePolicies"] = value; } - } - - public static AccessToken GoogleAccessToken { - get { return (AccessToken)(HttpContext.Current.Session["GoogleAccessToken"] ?? new AccessToken()); } - set { HttpContext.Current.Session["GoogleAccessToken"] = value; } - } - - public static void Clear() { - ProfileFields = null; - FetchResponse = null; - FriendlyLoginName = null; - PapePolicies = null; - GoogleAccessToken = new AccessToken(); - } - } -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Code/TracePageAppender.cs b/samples/OpenIdRelyingPartyWebForms/Code/TracePageAppender.cs deleted file mode 100644 index a03293b..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Code/TracePageAppender.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OpenIdRelyingPartyWebForms.Code { - using System; - using System.Collections.Generic; - using System.IO; - using System.Web; - - public class TracePageAppender : log4net.Appender.AppenderSkeleton { - protected override void Append(log4net.Core.LoggingEvent loggingEvent) { - StringWriter sw = new StringWriter(Global.LogMessages); - Layout.Format(sw, loggingEvent); - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/Default.aspx b/samples/OpenIdRelyingPartyWebForms/Default.aspx deleted file mode 100644 index 99f9885..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Default.aspx +++ /dev/null @@ -1,13 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.UI" Namespace="DotNetOpenAuth" TagPrefix="openid" %> -<asp:Content runat="server" ContentPlaceHolderID="head"> - <openid:XrdsPublisher ID="XrdsPublisher1" runat="server" XrdsUrl="~/xrds.aspx" /> -</asp:Content> -<asp:Content runat="server" ContentPlaceHolderID="main"> - <h2>Relying Party </h2> - <p>Visit the - <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/MembersOnly/Default.aspx" - Text="Members Only" /> - area. (This will trigger a login demo). </p> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx b/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx deleted file mode 100644 index 21b6a12..0000000 --- a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DetectGoogleSession.aspx.cs" - Inherits="OpenIdRelyingPartyWebForms.DetectGoogleSession" ValidateRequest="false" - MasterPageFile="~/Site.Master" Async="true" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" - TagPrefix="rp" %> -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" 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 deleted file mode 100644 index 909c4bc..0000000 --- a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.cs +++ /dev/null @@ -1,57 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Web; - using System.Web.UI; - - using DotNetOpenAuth.ApplicationBlock.CustomExtensions; - using DotNetOpenAuth.OpenId; - 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) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - 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 = await openid.GetResponseAsync(new HttpRequestWrapper(Request), Response.ClientDisconnectedToken); - 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 = - await - openid.CreateRequestAsync( - "https://www.google.com/accounts/o8/id", new HttpRequestWrapper(Request), Response.ClientDisconnectedToken); - request.AddExtension(new UIRequest { Mode = UIModeDetectSession }); - request.Mode = AuthenticationRequestMode.Immediate; - await request.RedirectToProviderAsync(new HttpContextWrapper(this.Context), Response.ClientDisconnectedToken); - } 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 deleted file mode 100644 index 576c646..0000000 --- a/samples/OpenIdRelyingPartyWebForms/DetectGoogleSession.aspx.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// <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/Global.asax b/samples/OpenIdRelyingPartyWebForms/Global.asax deleted file mode 100644 index 8be3cd1..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="OpenIdRelyingPartyWebForms.Global" Language="C#" %> diff --git a/samples/OpenIdRelyingPartyWebForms/Global.asax.cs b/samples/OpenIdRelyingPartyWebForms/Global.asax.cs deleted file mode 100644 index 8460d49..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Global.asax.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Collections.Specialized; - using System.Configuration; - using System.IO; - using System.Text; - using System.Web; - using DotNetOpenAuth.ApplicationBlock; - using DotNetOpenAuth.OAuth; - using OpenIdRelyingPartyWebForms.Code; - - public class Global : HttpApplication { - public static log4net.ILog Logger = log4net.LogManager.GetLogger(typeof(Global)); - - internal static StringBuilder LogMessages = new StringBuilder(); - - internal static WebConsumerOpenIdRelyingParty GoogleWebConsumer { - get { - var googleWebConsumer = (WebConsumerOpenIdRelyingParty)HttpContext.Current.Application["GoogleWebConsumer"]; - if (googleWebConsumer == null) { - googleWebConsumer = new WebConsumerOpenIdRelyingParty { ServiceProvider = GoogleConsumer.ServiceDescription }; - HttpContext.Current.Application["GoogleWebConsumer"] = googleWebConsumer; - } - - return googleWebConsumer; - } - } - - public static string ToString(NameValueCollection collection) { - using (StringWriter sw = new StringWriter()) { - foreach (string key in collection.Keys) { - sw.WriteLine("{0} = '{1}'", key, collection[key]); - } - return sw.ToString(); - } - } - - protected void Application_Start(object sender, EventArgs e) { - log4net.Config.XmlConfigurator.Configure(); - Logger.Info("Sample starting..."); - } - - protected void Application_End(object sender, EventArgs e) { - Logger.Info("Sample shutting down..."); - - // this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown(); - } - - protected void Application_BeginRequest(object sender, EventArgs e) { - // System.Diagnostics.Debugger.Launch(); - Logger.DebugFormat("Processing {0} on {1} ", Request.HttpMethod, stripQueryString(Request.Url)); - if (Request.QueryString.Count > 0) { - Logger.DebugFormat("Querystring follows: \n{0}", ToString(Request.QueryString)); - } - if (Request.Form.Count > 0) { - Logger.DebugFormat("Posted form follows: \n{0}", ToString(Request.Form)); - } - } - - protected void Application_AuthenticateRequest(object sender, EventArgs e) { - Logger.DebugFormat("User {0} authenticated.", HttpContext.Current.User != null ? "IS" : "is NOT"); - } - - protected void Application_EndRequest(object sender, EventArgs e) { - } - - protected void Application_Error(object sender, EventArgs e) { - Logger.ErrorFormat("An unhandled exception was raised. Details follow: {0}", HttpContext.Current.Server.GetLastError()); - } - - private static string stripQueryString(Uri uri) { - UriBuilder builder = new UriBuilder(uri); - builder.Query = null; - return builder.ToString(); - } - } -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/Default.aspx b/samples/OpenIdRelyingPartyWebForms/MembersOnly/Default.aspx deleted file mode 100644 index 59a4eed..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/Default.aspx +++ /dev/null @@ -1,37 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" %> -<%@ Import Namespace="OpenIdRelyingPartyWebForms" %> -<%@ Register Src="~/MembersOnly/ProfileFieldsDisplay.ascx" TagPrefix="cc1" TagName="ProfileFieldsDisplay" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2> - Members Only Area - </h2> - <p> - Congratulations, <b><asp:LoginName ID="LoginName1" runat="server" /></b>. - You have completed the OpenID login process. - </p> - -<% if (State.PapePolicies != null) { %> - <p>A PAPE extension was included in the authentication with this content: </p> - <ul> - <% if (State.PapePolicies.NistAssuranceLevel != null) {%> - <li>Nist: <%=HttpUtility.HtmlEncode(State.PapePolicies.NistAssuranceLevel.Value.ToString())%></li> - <% } - foreach (string policy in State.PapePolicies.ActualPolicies) { %> - <li><%=HttpUtility.HtmlEncode(policy) %></li> - <% } - if (State.PapePolicies.AuthenticationTimeUtc.HasValue) { %> - <li>The provider authenticated the user at <%=State.PapePolicies.AuthenticationTimeUtc.Value.ToLocalTime() %> (local time)</li> - <% } %> - </ul> -<% } %> - -<% if (State.ProfileFields != null) { - profileFieldsDisplay.ProfileValues = State.ProfileFields; %> - <p> - In addition to authenticating you, your OpenID Provider may - have told us something about you using the - Simple Registration extension: - </p> - <cc1:ProfileFieldsDisplay runat="server" ID="profileFieldsDisplay" /> -<% } %> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx deleted file mode 100644 index b8caa93..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx +++ /dev/null @@ -1,22 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="DisplayGoogleContacts.aspx.cs" - Inherits="OpenIdRelyingPartyWebForms.MembersOnly.DisplayGoogleContacts" Async="true" %> - -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0"> - <asp:View ID="View1" runat="server"> - <p>Obtain an access token by <asp:HyperLink NavigateUrl="~/loginPlusOAuth.aspx" runat="server" - Text="logging in at our OpenID+OAuth hybrid login page" />. </p> - <p>If you've already done that, then you might have inadvertently clicked "Allow [this - site] to remember me", which causes Google to stop sending the access token that - this sample doesn't save. If you did check it, you can restore this sample's - functionality by <a href="https://www.google.com/accounts/IssuedAuthSubTokens">revoking - access</a> to this site from your Google Account. </p> - </asp:View> - <asp:View ID="View2" runat="server"> - <h2>Address book</h2> - <p>These are the contacts for Google Account: <asp:Label ID="emailLabel" runat="server" - Font-Bold="True" /> and OpenID <asp:Label ID="claimedIdLabel" runat="server" Font-Bold="True" /></p> - <asp:PlaceHolder ID="resultsPlaceholder" runat="server" /> - </asp:View> - </asp:MultiView> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs deleted file mode 100644 index d06e2f6..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace OpenIdRelyingPartyWebForms.MembersOnly { - using System; - using System.Linq; - using System.Text; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - using System.Xml.Linq; - using DotNetOpenAuth.ApplicationBlock; - using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; - - public partial class DisplayGoogleContacts : System.Web.UI.Page { - protected void Page_Load(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - if (!string.IsNullOrEmpty(State.GoogleAccessToken.Token)) { - this.MultiView1.ActiveViewIndex = 1; - if (State.FetchResponse != null && State.FetchResponse.Attributes.Contains(WellKnownAttributes.Contact.Email)) { - this.emailLabel.Text = State.FetchResponse.Attributes[WellKnownAttributes.Contact.Email].Values[0]; - } else { - this.emailLabel.Text = "unavailable"; - } - this.claimedIdLabel.Text = this.User.Identity.Name; - var google = new GoogleConsumer { - ConsumerKey = Global.GoogleWebConsumer.ConsumerKey, - ConsumerSecret = Global.GoogleWebConsumer.ConsumerSecret, - }; - var contactsDocument = await google.GetContactsAsync(State.GoogleAccessToken); - this.RenderContacts(contactsDocument); - } - })); - } - - private void RenderContacts(XDocument contactsDocument) { - var contacts = from entry in contactsDocument.Root.Elements(XName.Get("entry", "http://www.w3.org/2005/Atom")) - select new { Name = entry.Element(XName.Get("title", "http://www.w3.org/2005/Atom")).Value, Email = entry.Element(XName.Get("email", "http://schemas.google.com/g/2005")).Attribute("address").Value }; - StringBuilder tableBuilder = new StringBuilder(); - tableBuilder.Append("<table><tr><td>Name</td><td>Email</td></tr>"); - foreach (var contact in contacts) { - tableBuilder.AppendFormat( - "<tr><td>{0}</td><td>{1}</td></tr>", - HttpUtility.HtmlEncode(contact.Name), - HttpUtility.HtmlEncode(contact.Email)); - } - tableBuilder.Append("</table>"); - this.resultsPlaceholder.Controls.Add(new Literal { Text = tableBuilder.ToString() }); - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.designer.cs deleted file mode 100644 index 9521781..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/DisplayGoogleContacts.aspx.designer.cs +++ /dev/null @@ -1,69 +0,0 @@ -//------------------------------------------------------------------------------ -// <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.MembersOnly { - - - public partial class DisplayGoogleContacts { - - /// <summary> - /// MultiView1 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.MultiView MultiView1; - - /// <summary> - /// View1 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.View View1; - - /// <summary> - /// View2 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.View View2; - - /// <summary> - /// emailLabel 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 emailLabel; - - /// <summary> - /// claimedIdLabel 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 claimedIdLabel; - - /// <summary> - /// resultsPlaceholder 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.PlaceHolder resultsPlaceholder; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx b/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx deleted file mode 100644 index b2e5f7e..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx +++ /dev/null @@ -1,75 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProfileFieldsDisplay.ascx.cs" Inherits="OpenIdRelyingPartyWebForms.MembersOnly.ProfileFieldsDisplay" %> -<table id="profileFieldsTable" runat="server"> - <tr> - <td> - Nickname - </td> - <td> - <%=ProfileValues.Nickname %> - </td> - </tr> - <tr> - <td> - Email - </td> - <td> - <%=ProfileValues.Email%> - </td> - </tr> - <tr> - <td> - FullName - </td> - <td> - <%=ProfileValues.FullName%> - </td> - </tr> - <tr> - <td> - Date of Birth - </td> - <td> - <%=ProfileValues.BirthDate.ToString()%> - </td> - </tr> - <tr> - <td> - Gender - </td> - <td> - <%=ProfileValues.Gender.ToString()%> - </td> - </tr> - <tr> - <td> - Post Code - </td> - <td> - <%=ProfileValues.PostalCode%> - </td> - </tr> - <tr> - <td> - Country - </td> - <td> - <%=ProfileValues.Country%> - </td> - </tr> - <tr> - <td> - Language - </td> - <td> - <%=ProfileValues.Language%> - </td> - </tr> - <tr> - <td> - Timezone - </td> - <td> - <%=ProfileValues.TimeZone%> - </td> - </tr> -</table> diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx.cs b/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx.cs deleted file mode 100644 index 4fb127e..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace OpenIdRelyingPartyWebForms.MembersOnly { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - - public partial class ProfileFieldsDisplay : System.Web.UI.UserControl { - public ClaimsResponse ProfileValues { get; set; } - } -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx.designer.cs b/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx.designer.cs deleted file mode 100644 index 4a5dc8a..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/ProfileFieldsDisplay.ascx.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// This code was generated by a tool. -// Runtime Version:2.0.50727.4918 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace OpenIdRelyingPartyWebForms.MembersOnly { - - - public partial class ProfileFieldsDisplay { - - /// <summary> - /// profileFieldsTable control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::System.Web.UI.HtmlControls.HtmlTable profileFieldsTable; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/MembersOnly/Web.config b/samples/OpenIdRelyingPartyWebForms/MembersOnly/Web.config deleted file mode 100644 index 3cfad05..0000000 --- a/samples/OpenIdRelyingPartyWebForms/MembersOnly/Web.config +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<!-- - Note: As an alternative to hand editing this file you can use the - web admin tool to configure settings for your application. Use - the Website->Asp.Net Configuration option in Visual Studio. - A full list of settings and comments can be found in - machine.config.comments usually located in - \Windows\Microsoft.Net\Framework\v2.x\Config ---> -<configuration> - <appSettings/> - <connectionStrings/> - <system.web> - <authorization> - <deny users="?"/> - </authorization> - </system.web> -</configuration> diff --git a/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx b/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx deleted file mode 100644 index e9dcf5d..0000000 --- a/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx +++ /dev/null @@ -1,47 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NoIdentityOpenId.aspx.cs" Async="true" - MasterPageFile="~/Site.Master" Inherits="OpenIdRelyingPartyWebForms.NoIdentityOpenId" %> - -<asp:Content runat="server" ContentPlaceHolderID="Main"> - <h2>No-login OpenID extension Page </h2> - <p>This demonstrates an RP sending an extension-only request to an OP that carries - extensions that request anonymous information about you. In this scenario, the OP - would still authenticate the user, but would not assert any OpenID Identifier back - to the RP, but might provide information regarding the user such as age or membership - in an organization. </p> - <p><b>Note: </b>At time of this writing, most OPs do not support this feature, although - it is documented in the OpenID 2.0 spec. </p> - <asp:Panel runat="server" DefaultButton="beginButton"> - <asp:Label ID="Label1" runat="server" Text="OpenID Identifier" /> <asp:TextBox ID="openIdBox" - runat="server" /> - <asp:Button ID="beginButton" runat="server" Text="Begin" OnClick="beginButton_Click" /> - <asp:CustomValidator runat="server" ID="openidValidator" ErrorMessage="Invalid OpenID Identifier" - ControlToValidate="openIdBox" EnableViewState="false" Display="Dynamic" OnServerValidate="openidValidator_ServerValidate" /> - <asp:Label runat="server" EnableViewState="false" ID="resultMessage" /> - </asp:Panel> - <asp:Panel runat="server" ID="ExtensionResponsesPanel" EnableViewState="false" Visible="false"> - <p>We have received a reasonable response from the Provider. Below is the Simple Registration - response we received, if any: </p> - <table id="profileFieldsTable" runat="server"> - <tr> - <td>Email </td> - <td><asp:Label runat="server" ID="emailLabel" /> </td> - </tr> - <tr> - <td>Gender </td> - <td><asp:Label runat="server" ID="genderLabel" /> </td> - </tr> - <tr> - <td>Post Code </td> - <td><asp:Label runat="server" ID="postalCodeLabel" /> </td> - </tr> - <tr> - <td>Country </td> - <td><asp:Label runat="server" ID="countryLabel" /> </td> - </tr> - <tr> - <td>Timezone </td> - <td><asp:Label runat="server" ID="timeZoneLabel" /> </td> - </tr> - </table> - </asp:Panel> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx.cs b/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx.cs deleted file mode 100644 index fcfa257..0000000 --- a/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx.cs +++ /dev/null @@ -1,91 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Threading; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - using DotNetOpenAuth.Messaging; - using DotNetOpenAuth.OpenId; - using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class NoIdentityOpenId : System.Web.UI.Page { - protected async void Page_Load(object sender, EventArgs e) { - this.openIdBox.Focus(); - using (OpenIdRelyingParty rp = new OpenIdRelyingParty()) { - IAuthenticationResponse response = await rp.GetResponseAsync(new HttpRequestWrapper(this.Request), this.Response.ClientDisconnectedToken); - if (response != null) { - switch (response.Status) { - case AuthenticationStatus.ExtensionsOnly: - this.ExtensionResponsesPanel.Visible = true; - - // This is the "success" status we get when no authentication was requested. - var sreg = response.GetExtension<ClaimsResponse>(); - if (sreg != null) { - this.emailLabel.Text = sreg.Email; - this.timeZoneLabel.Text = sreg.TimeZone; - this.postalCodeLabel.Text = sreg.PostalCode; - this.countryLabel.Text = sreg.Country; - if (sreg.Gender.HasValue) { - this.genderLabel.Text = sreg.Gender.Value.ToString(); - } - } - break; - case AuthenticationStatus.Canceled: - this.resultMessage.Text = "Canceled at OP. This may be a sign that the OP doesn't support this message."; - break; - case AuthenticationStatus.Failed: - this.resultMessage.Text = "OP returned a failure: " + response.Exception; - break; - case AuthenticationStatus.SetupRequired: - case AuthenticationStatus.Authenticated: - default: - this.resultMessage.Text = "OP returned an unexpected response."; - break; - } - } - } - } - - protected void beginButton_Click(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - if (!this.Page.IsValid) { - return; // don't login if custom validation failed. - } - try { - using (OpenIdRelyingParty rp = new OpenIdRelyingParty()) { - var request = - await - rp.CreateRequestAsync(this.openIdBox.Text, new HttpRequestWrapper(Request), Response.ClientDisconnectedToken); - request.IsExtensionOnly = true; - - // This is where you would add any OpenID extensions you wanted - // to include in the request. - request.AddExtension( - new ClaimsRequest { - Email = DemandLevel.Request, - Country = DemandLevel.Request, - Gender = DemandLevel.Require, - PostalCode = DemandLevel.Require, - TimeZone = DemandLevel.Require, - }); - - await request.RedirectToProviderAsync(new HttpContextWrapper(Context), Response.ClientDisconnectedToken); - } - } catch (ProtocolException ex) { - // The user probably entered an Identifier that - // was not a valid OpenID endpoint. - this.openidValidator.Text = ex.Message; - this.openidValidator.IsValid = false; - } - })); - } - - protected void openidValidator_ServerValidate(object source, ServerValidateEventArgs args) { - // This catches common typos that result in an invalid OpenID Identifier. - args.IsValid = Identifier.IsValid(args.Value); - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx.designer.cs deleted file mode 100644 index 348ea31..0000000 --- a/samples/OpenIdRelyingPartyWebForms/NoIdentityOpenId.aspx.designer.cs +++ /dev/null @@ -1,123 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 NoIdentityOpenId { - - /// <summary> - /// Label1 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 Label1; - - /// <summary> - /// openIdBox 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.TextBox openIdBox; - - /// <summary> - /// beginButton 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.Button beginButton; - - /// <summary> - /// openidValidator 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.CustomValidator openidValidator; - - /// <summary> - /// resultMessage 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 resultMessage; - - /// <summary> - /// ExtensionResponsesPanel 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.Panel ExtensionResponsesPanel; - - /// <summary> - /// profileFieldsTable control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::System.Web.UI.HtmlControls.HtmlTable profileFieldsTable; - - /// <summary> - /// emailLabel 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 emailLabel; - - /// <summary> - /// genderLabel 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 genderLabel; - - /// <summary> - /// postalCodeLabel 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 postalCodeLabel; - - /// <summary> - /// countryLabel 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 countryLabel; - - /// <summary> - /// timeZoneLabel 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 timeZoneLabel; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj b/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj deleted file mode 100644 index 8a9e99d..0000000 --- a/samples/OpenIdRelyingPartyWebForms/OpenIdRelyingPartyWebForms.csproj +++ /dev/null @@ -1,318 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " /> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> - <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> - <IISExpressSSLPort /> - <IISExpressAnonymousAuthentication /> - <IISExpressWindowsAuthentication /> - <IISExpressUseClassicPipelineMode /> - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\src\</SolutionDir> - </PropertyGroup> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{1E8AEA89-BF69-47A1-B290-E8B0FE588700}</ProjectGuid> - <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>OpenIdRelyingPartyWebForms</RootNamespace> - <AssemblyName>OpenIdRelyingPartyWebForms</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>4.0</OldToolsVersion> - <UpgradeBackupLocation /> - <TargetFrameworkProfile /> - <UseIISExpress>true</UseIISExpress> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'CodeAnalysis|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <OutputPath>bin\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <DebugType>full</DebugType> - <PlatformTarget>AnyCPU</PlatformTarget> - <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> - <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> - <ErrorReport>prompt</ErrorReport> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup> - <DefineConstants>$(DefineConstants);SAMPLESONLY</DefineConstants> - </PropertyGroup> - <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Net.Http.Extensions"> - <HintPath>..\..\src\packages\Microsoft.Net.Http.2.2.15\lib\net45\System.Net.Http.Extensions.dll</HintPath> - </Reference> - <Reference Include="System.Net.Http.Primitives"> - <HintPath>..\..\src\packages\Microsoft.Net.Http.2.2.15\lib\net45\System.Net.Http.Primitives.dll</HintPath> - </Reference> - <Reference Include="System.Net.Http.WebRequest" /> - <Reference Include="System.Web" /> - <Reference Include="System.Web.ApplicationServices" /> - <Reference Include="System.Web.DynamicData" /> - <Reference Include="System.Web.Entity" /> - <Reference Include="System.Web.Extensions" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Configuration" /> - <Reference Include="System.Web.Services" /> - <Reference Include="System.EnterpriseServices" /> - <Reference Include="System.Web.Mobile" /> - <Reference Include="System.Xml.Linq" /> - </ItemGroup> - <ItemGroup> - <Content Include="Default.aspx" /> - <Content Include="DetectGoogleSession.aspx" /> - <Content Include="Global.asax" /> - <Content Include="images\openid_login.png" /> - <Content Include="login.aspx" /> - <Content Include="loginProgrammatic.aspx" /> - <Content Include="logout.aspx" /> - <Content Include="PrivacyPolicy.aspx" /> - <Content Include="styles.css" /> - <Content Include="TracePage.aspx" /> - <Content Include="Web.config"> - <SubType>Designer</SubType> - </Content> - </ItemGroup> - <ItemGroup> - <Compile Include="ajaxlogin.aspx.cs"> - <DependentUpon>ajaxlogin.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="ajaxlogin.aspx.designer.cs"> - <DependentUpon>ajaxlogin.aspx</DependentUpon> - </Compile> - <Compile Include="Code\CustomStore.cs" /> - <Compile Include="Code\CustomStoreDataSet.cs"> - <DependentUpon>CustomStoreDataSet.xsd</DependentUpon> - <SubType>Component</SubType> - </Compile> - <Compile Include="Code\CustomStoreDataSet.Designer.cs"> - <DependentUpon>CustomStoreDataSet.cs</DependentUpon> - </Compile> - <Compile Include="Code\CustomStoreDataSet1.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>CustomStoreDataSet.xsd</DependentUpon> - </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> - </Compile> - <Compile Include="loginGoogleApps.aspx.designer.cs"> - <DependentUpon>loginGoogleApps.aspx</DependentUpon> - </Compile> - <Compile Include="loginPlusOAuthSampleOP.aspx.cs"> - <DependentUpon>loginPlusOAuthSampleOP.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="loginPlusOAuthSampleOP.aspx.designer.cs"> - <DependentUpon>loginPlusOAuthSampleOP.aspx</DependentUpon> - </Compile> - <Compile Include="Global.asax.cs"> - <DependentUpon>Global.asax</DependentUpon> - </Compile> - <Compile Include="login.aspx.cs"> - <DependentUpon>login.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="login.aspx.designer.cs"> - <DependentUpon>login.aspx</DependentUpon> - </Compile> - <Compile Include="loginPlusOAuth.aspx.cs"> - <DependentUpon>loginPlusOAuth.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="loginPlusOAuth.aspx.designer.cs"> - <DependentUpon>loginPlusOAuth.aspx</DependentUpon> - </Compile> - <Compile Include="loginProgrammatic.aspx.cs"> - <DependentUpon>loginProgrammatic.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="loginProgrammatic.aspx.designer.cs"> - <DependentUpon>loginProgrammatic.aspx</DependentUpon> - </Compile> - <Compile Include="MembersOnly\DisplayGoogleContacts.aspx.cs"> - <DependentUpon>DisplayGoogleContacts.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="MembersOnly\DisplayGoogleContacts.aspx.designer.cs"> - <DependentUpon>DisplayGoogleContacts.aspx</DependentUpon> - </Compile> - <Compile Include="MembersOnly\ProfileFieldsDisplay.ascx.cs"> - <DependentUpon>ProfileFieldsDisplay.ascx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="MembersOnly\ProfileFieldsDisplay.ascx.designer.cs"> - <DependentUpon>ProfileFieldsDisplay.ascx</DependentUpon> - </Compile> - <Compile Include="NoIdentityOpenId.aspx.cs"> - <DependentUpon>NoIdentityOpenId.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="NoIdentityOpenId.aspx.designer.cs"> - <DependentUpon>NoIdentityOpenId.aspx</DependentUpon> - </Compile> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="TracePage.aspx.cs"> - <DependentUpon>TracePage.aspx</DependentUpon> - <SubType>ASPXCodeBehind</SubType> - </Compile> - <Compile Include="TracePage.aspx.designer.cs"> - <DependentUpon>TracePage.aspx</DependentUpon> - </Compile> - </ItemGroup> - <ItemGroup> - <Content Include="ajaxlogin.aspx" /> - <Content Include="MembersOnly\Default.aspx" /> - <Content Include="Site.Master" /> - <Content Include="xrds.aspx" /> - </ItemGroup> - <ItemGroup> - <Content Include="favicon.ico" /> - <Content Include="images\DotNetOpenAuth.png" /> - <Content Include="loginGoogleApps.aspx" /> - <Content Include="loginPlusOAuthSampleOP.aspx" /> - <Content Include="images\attention.png" /> - <Content Include="images\yahoo.png" /> - <Content Include="loginPlusOAuth.aspx" /> - <Content Include="MembersOnly\DisplayGoogleContacts.aspx" /> - <Content Include="MembersOnly\ProfileFieldsDisplay.ascx" /> - <Content Include="MembersOnly\Web.config" /> - <Content Include="NoIdentityOpenId.aspx" /> - </ItemGroup> - <ItemGroup> - <None Include="Code\CustomStoreDataSet.xsc"> - <DependentUpon>CustomStoreDataSet.xsd</DependentUpon> - </None> - <None Include="Code\CustomStoreDataSet.xsd"> - <Generator>MSDataSetGenerator</Generator> - <LastGenOutput>CustomStoreDataSet1.Designer.cs</LastGenOutput> - <SubType>Designer</SubType> - </None> - <None Include="Code\CustomStoreDataSet.xss"> - <DependentUpon>CustomStoreDataSet.xsd</DependentUpon> - </None> - <Content Include="packages.config" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\src\DotNetOpenAuth.Core.UI\DotNetOpenAuth.Core.UI.csproj"> - <Project>{173E7B8D-E751-46E2-A133-F72297C0D2F4}</Project> - <Name>DotNetOpenAuth.Core.UI</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.Core\DotNetOpenAuth.Core.csproj"> - <Project>{60426312-6AE5-4835-8667-37EDEA670222}</Project> - <Name>DotNetOpenAuth.Core</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OAuth.Consumer\DotNetOpenAuth.OAuth.Consumer.csproj"> - <Project>{B202E40D-4663-4A2B-ACDA-865F88FF7CAA}</Project> - <Name>DotNetOpenAuth.OAuth.Consumer</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OAuth\DotNetOpenAuth.OAuth.csproj"> - <Project>{A288FCC8-6FCF-46DA-A45E-5F9281556361}</Project> - <Name>DotNetOpenAuth.OAuth</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId.RelyingParty.UI\DotNetOpenAuth.OpenId.RelyingParty.UI.csproj"> - <Project>{1ED8D424-F8AB-4050-ACEB-F27F4F909484}</Project> - <Name>DotNetOpenAuth.OpenId.RelyingParty.UI</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId.RelyingParty\DotNetOpenAuth.OpenId.RelyingParty.csproj"> - <Project>{F458AB60-BA1C-43D9-8CEF-EC01B50BE87B}</Project> - <Name>DotNetOpenAuth.OpenId.RelyingParty</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId.UI\DotNetOpenAuth.OpenId.UI.csproj"> - <Project>{75E13AAE-7D51-4421-ABFD-3F3DC91F576E}</Project> - <Name>DotNetOpenAuth.OpenId.UI</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenIdOAuth\DotNetOpenAuth.OpenIdOAuth.csproj"> - <Project>{4BFAA336-5DF3-4F27-82D3-06D13240E8AB}</Project> - <Name>DotNetOpenAuth.OpenIdOAuth</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId\DotNetOpenAuth.OpenId.csproj"> - <Project>{3896A32A-E876-4C23-B9B8-78E17D134CD3}</Project> - <Name>DotNetOpenAuth.OpenId</Name> - </ProjectReference> - <ProjectReference Include="..\DotNetOpenAuth.ApplicationBlock\DotNetOpenAuth.ApplicationBlock.csproj"> - <Project>{AA78D112-D889-414B-A7D4-467B34C7B663}</Project> - <Name>DotNetOpenAuth.ApplicationBlock</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> - <!-- 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> - --> - <ProjectExtensions> - <VisualStudio> - <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> - <WebProjectProperties> - <UseIIS>True</UseIIS> - <AutoAssignPort>True</AutoAssignPort> - <DevelopmentServerPort>4856</DevelopmentServerPort> - <DevelopmentServerVPath>/</DevelopmentServerVPath> - <IISUrl>http://localhost:4856/</IISUrl> - <NTLMAuthentication>False</NTLMAuthentication> - <UseCustomServer>False</UseCustomServer> - <CustomServerUrl> - </CustomServerUrl> - <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> - </WebProjectProperties> - </FlavorProperties> - </VisualStudio> - </ProjectExtensions> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " /> - <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> - <Import Project="..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" /> - <Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> - <Error Condition="!Exists('..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> - <Error Condition="Exists('..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> - </Target> -</Project>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/PrivacyPolicy.aspx b/samples/OpenIdRelyingPartyWebForms/PrivacyPolicy.aspx deleted file mode 100644 index e99112e..0000000 --- a/samples/OpenIdRelyingPartyWebForms/PrivacyPolicy.aspx +++ /dev/null @@ -1,7 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Privacy Policy</h2> - <p> - Some privacy policy would go here. - </p> -</asp:Content>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Properties/AssemblyInfo.cs b/samples/OpenIdRelyingPartyWebForms/Properties/AssemblyInfo.cs deleted file mode 100644 index ea71bfc..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 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. -[assembly: AssemblyTitle("OpenIdRelyingPartyWebForms sample")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DotNetOpenAuth")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// 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 Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("0.2.0.0")] -[assembly: AssemblyFileVersion("0.2.0.0")] diff --git a/samples/OpenIdRelyingPartyWebForms/Settings.StyleCop b/samples/OpenIdRelyingPartyWebForms/Settings.StyleCop deleted file mode 100644 index 7f55ce6..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Settings.StyleCop +++ /dev/null @@ -1 +0,0 @@ -<StyleCopSettings Version="4.3" />
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/Site.Master b/samples/OpenIdRelyingPartyWebForms/Site.Master deleted file mode 100644 index a7a3dab..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Site.Master +++ /dev/null @@ -1,39 +0,0 @@ -<%@ Master Language="C#" AutoEventWireup="true" %> -<%@ Import Namespace="OpenIdRelyingPartyWebForms" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<script runat="server"> - protected void Page_Load(object sender, EventArgs e) { - friendlyUsername.Text = State.FriendlyLoginName; - } - - protected void LoginStatus1_LoggedOut(object sender, EventArgs e) { - State.Clear(); - } -</script> - -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title>OpenID Relying Party, by DotNetOpenAuth</title> - <link href="styles.css" rel="stylesheet" type="text/css" /> - <asp:ContentPlaceHolder ID="head" runat="server" /> -</head> -<body> - <form id="form1" runat="server"> - <span style="float: right"> - <asp:Image runat="server" ID="openIdUsernameImage" ImageUrl="~/images/openid_login.png" - EnableViewState="false" /> - <asp:Label runat="server" ID="friendlyUsername" Text="" EnableViewState="false" /> - <asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" /> - </span> - <div> - <a href="http://dotnetopenauth.net"> - <img runat="server" src="~/images/DotNetOpenAuth.png" title="Jump to the project web site." - alt="DotNetOpenAuth" border='0' /></a> - </div> - <div> - <asp:ContentPlaceHolder ID="Main" runat="server" /> - </div> - </form> -</body> -</html> diff --git a/samples/OpenIdRelyingPartyWebForms/TracePage.aspx b/samples/OpenIdRelyingPartyWebForms/TracePage.aspx deleted file mode 100644 index b115298..0000000 --- a/samples/OpenIdRelyingPartyWebForms/TracePage.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TracePage.aspx.cs" Inherits="OpenIdRelyingPartyWebForms.TracePage" %> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title></title> -</head> -<body> - <form id="form1" runat="server"> - <p align="right"> - <asp:Button runat="server" Text="Clear log" ID="clearLogButton" OnClick="clearLogButton_Click" /> - </p> - <pre><asp:PlaceHolder runat="server" ID="placeHolder1" /></pre> - </form> -</body> -</html> diff --git a/samples/OpenIdRelyingPartyWebForms/TracePage.aspx.cs b/samples/OpenIdRelyingPartyWebForms/TracePage.aspx.cs deleted file mode 100644 index 171bb67..0000000 --- a/samples/OpenIdRelyingPartyWebForms/TracePage.aspx.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Collections.Generic; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - - public partial class TracePage : System.Web.UI.Page { - protected void Page_Load(object sender, EventArgs e) { - this.placeHolder1.Controls.Add(new Label { Text = HttpUtility.HtmlEncode(Global.LogMessages.ToString()) }); - } - - protected void clearLogButton_Click(object sender, EventArgs e) { - Global.LogMessages.Length = 0; - - // clear the page immediately, and allow for F5 without a Postback warning. - this.Response.Redirect(this.Request.Url.AbsoluteUri); - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/TracePage.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/TracePage.aspx.designer.cs deleted file mode 100644 index 8d8720d..0000000 --- a/samples/OpenIdRelyingPartyWebForms/TracePage.aspx.designer.cs +++ /dev/null @@ -1,43 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// This code was generated by a tool. -// Runtime Version:2.0.50727.4912 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace OpenIdRelyingPartyWebForms { - - - public partial class TracePage { - - /// <summary> - /// form1 control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// <summary> - /// clearLogButton 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.Button clearLogButton; - - /// <summary> - /// placeHolder1 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.PlaceHolder placeHolder1; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/Web.config b/samples/OpenIdRelyingPartyWebForms/Web.config deleted file mode 100644 index f5fada9..0000000 --- a/samples/OpenIdRelyingPartyWebForms/Web.config +++ /dev/null @@ -1,127 +0,0 @@ -<?xml version="1.0"?> -<configuration> - <configSections> - <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" /> - <sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core"> - <section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" /> - <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" /> - <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" /> - <section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" /> - </sectionGroup> - </configSections> - - <!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names), - which is necessary for OpenID urls with unicode characters in the domain/host name. - It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. --> - <uri> - <idn enabled="All"/> - <iriParsing enabled="true"/> - </uri> - - <system.net> - <defaultProxy enabled="true" /> - <settings> - <!-- This setting causes .NET to check certificate revocation lists (CRL) - before trusting HTTPS certificates. But this setting tends to not - be allowed in shared hosting environments. --> - <!--<servicePointManager checkCertificateRevocationList="true"/>--> - </settings> - </system.net> - - <!-- this is an optional configuration section where aspects of dotnetopenauth can be customized --> - <dotNetOpenAuth> - <openid> - <relyingParty> - <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). --> - <add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth.OpenId.RelyingParty" /> - <!--<add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.GsaIcamProfile, DotNetOpenAuth.OpenId.RelyingParty" />--> - </behaviors> - <!-- Uncomment the following to activate the sample custom store. --> - <!--<store type="OpenIdRelyingPartyWebForms.Code.CustomStore, OpenIdRelyingPartyWebForms" />--> - </relyingParty> - </openid> - <messaging> - <untrustedWebRequest> - <whitelistHosts> - <!-- since this is a sample, and will often be used with localhost --> - <add name="localhost" /> - </whitelistHosts> - </untrustedWebRequest> - </messaging> - <!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. --> - <reporting enabled="true" /> - </dotNetOpenAuth> - - <appSettings> - <!-- Fill in your various consumer keys and secrets here to make the sample work. --> - <!-- You must get these values by signing up with each individual service provider. --> - <!-- Google sign-up: https://www.google.com/accounts/ManageDomains --> - <add key="googleConsumerKey" value="demo.dotnetopenauth.net"/> - <add key="googleConsumerSecret" value="5Yv1TfKm1551QrXZ9GpqepeD"/> - - <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> - </appSettings> - <system.web> - <!--<sessionState cookieless="true" />--> - <httpRuntime targetFramework="4.5" /> - <compilation debug="true" targetFramework="4.0" /> - <customErrors mode="RemoteOnly"/> - <authentication mode="Forms"> - <forms name="OpenIdRelyingPartySession"/> <!-- named cookie prevents conflicts with other samples --> - </authentication> - <trace enabled="false" writeToDiagnosticsTrace="true" /> - <!-- Trust level discussion: - Full: everything works (this is required for Google Apps for Domains support) - High: TRACE compilation symbol must NOT be defined - Medium: doesn't work unless originUrl=".*" or WebPermission.Connect is extended, and Google Apps doesn't work. - Low: doesn't work because WebPermission.Connect is denied. - --> - <trust level="Full" originUrl=".*"/> - <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> - </system.web> - - <!-- 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" /> - <appendToFile value="true" /> - <rollingStyle value="Size" /> - <maxSizeRollBackups value="10" /> - <maximumFileSize value="100KB" /> - <staticLogFileName value="true" /> - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" /> - </layout> - </appender> - <appender name="TracePageAppender" type="OpenIdRelyingPartyWebForms.Code.TracePageAppender, OpenIdRelyingPartyWebForms"> - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" /> - </layout> - </appender> - <!-- Setup the root category, add the appenders and set the default level --> - <root> - <level value="INFO" /> - <!--<appender-ref ref="RollingFileAppender" />--> - <appender-ref ref="TracePageAppender" /> - </root> - <!-- Specify the level for some specific categories --> - <logger name="DotNetOpenAuth"> - <level value="INFO" /> - </logger> - </log4net> - - <runtime> - <legacyHMACWarning enabled="0" /> - </runtime> - <system.webServer> - <modules runAllManagedModulesForAllRequests="true" /> - </system.webServer> -</configuration>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx deleted file mode 100644 index 916fca3..0000000 --- a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx +++ /dev/null @@ -1,100 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ajaxlogin.aspx.cs" Inherits="OpenIdRelyingPartyWebForms.ajaxlogin" - ValidateRequest="false" MasterPageFile="~/Site.Master" Async="true" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" 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 -{ - width: 200px; -} -input.openidtextbox -{ - width: 185px; -} -td -{ - vertical-align: top; -} -</style> -</asp:Content> - -<asp:Content runat="server" ContentPlaceHolderID="Main"> -<script type="text/javascript"> - function onauthenticated(sender, e) { - var emailBox = document.getElementById('<%= emailAddressBox.ClientID %>'); - emailBox.disabled = false; - emailBox.title = null; // remove tooltip describing why the box was disabled. - // the sreg response may not always be included. - if (e && e.sreg) { - // and the email field may not always be included in the sreg response. - if (e.sreg.email) { emailBox.value = e.sreg.email; } - } - } -</script> - - <asp:MultiView runat="server" ID="multiView" ActiveViewIndex='0'> - <asp:View runat="server" ID="commentSubmission"> - <p> - The scenario here is that you've just read a blog post and you want to comment on - that post. You're <b>not</b> actually logging into the web site by entering your - OpenID here, but your OpenID <i>will</i> be verified before the comment is posted. - </p> - <table> - <tr> - <td> - OpenID - </td> - <td> - <openid:OpenIdAjaxTextBox ID="OpenIdAjaxTextBox1" runat="server" CssClass="openidtextbox" - OnLoggingIn="OpenIdAjaxTextBox1_LoggingIn" - OnLoggedIn="OpenIdAjaxTextBox1_LoggedIn" - OnClientAssertionReceived="onauthenticated(sender, e)" - OnUnconfirmedPositiveAssertion="OpenIdAjaxTextBox1_UnconfirmedPositiveAssertion" /> - <asp:RequiredFieldValidator ID="openidRequiredValidator" runat="server" - ControlToValidate="OpenIdAjaxTextBox1" ValidationGroup="openidVG" - ErrorMessage="The OpenID field is required." SetFocusOnError="True"> - <asp:Image runat="server" ImageUrl="~/images/attention.png" ToolTip="This is a required field" /> - </asp:RequiredFieldValidator> - </td> - </tr> - <tr> - <td> - Email - </td> - <td> - <asp:TextBox runat="server" ID="emailAddressBox" Enabled="false" CssClass="textbox" ToolTip="This field will be enabled after you log in with your OpenID." /> - </td> - </tr> - <tr> - <td> - Comments - </td> - <td> - <asp:TextBox runat="server" ID="commentsBox" TextMode="MultiLine" Rows="5" CssClass="textbox" /> - </td> - </tr> - <tr> - <td></td> - <td> - <asp:Button runat="server" Text="Submit" ID="submitButton" OnClick="submitButton_Click" /> - </td> - </tr> - </table> - </asp:View> - <asp:View runat="server" ID="commentSubmitted"> - <p>Congratulations, - <asp:Label runat="server" ID="emailLabel" />! Your comment was received (and discarded... - this is just a demo after all).</p> - <asp:LinkButton runat="server" Text="Go back and change something in the comment" - OnClick="editComment_Click" /> - </asp:View> - <asp:View runat="server" ID="commentFailed"> - <p>Your comment submission failed.</p> - </asp:View> - </asp:MultiView> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs deleted file mode 100644 index ebfece3..0000000 --- a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Web.UI; - using System.Web.UI.WebControls; - using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class ajaxlogin : System.Web.UI.Page { - protected void Page_Load(object sender, EventArgs e) { - if (!IsPostBack) { - this.OpenIdAjaxTextBox1.Focus(); - } - } - - protected void OpenIdAjaxTextBox1_LoggingIn(object sender, OpenIdEventArgs e) { - e.Request.AddExtension(new ClaimsRequest { - Email = DemandLevel.Require, - }); - } - - protected void OpenIdAjaxTextBox1_LoggedIn(object sender, OpenIdEventArgs e) { - 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 - // potentially change the email in the HTML form, we'll use that instead. - ////var claims = OpenIdAjaxTextBox1.AuthenticationResponse.GetExtension<ClaimsResponse>(); - if (this.emailAddressBox.Text.Length > 0) { - label.Text += " (" + this.emailAddressBox.Text + ")"; - } - } - - protected void submitButton_Click(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - if (!Page.IsValid) { - return; - } - - var response = await this.OpenIdAjaxTextBox1.GetAuthenticationResponseAsync(Response.ClientDisconnectedToken); - if (response != null) { - if (response.Status == AuthenticationStatus.Authenticated) { - // Save comment here! - this.multiView.ActiveViewIndex = 1; - } else { - this.multiView.ActiveViewIndex = 2; - } - } - })); - } - - protected void editComment_Click(object sender, EventArgs e) { - this.multiView.ActiveViewIndex = 0; - } - - protected void OpenIdAjaxTextBox1_UnconfirmedPositiveAssertion(object sender, OpenIdEventArgs e) { - // This is where we register extensions that we want to have available in javascript - // on the browser. - this.OpenIdAjaxTextBox1.RegisterClientScriptExtension<ClaimsResponse>("sreg"); - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.designer.cs deleted file mode 100644 index 3687e1f..0000000 --- a/samples/OpenIdRelyingPartyWebForms/ajaxlogin.aspx.designer.cs +++ /dev/null @@ -1,105 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 ajaxlogin { - - /// <summary> - /// multiView 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.MultiView multiView; - - /// <summary> - /// commentSubmission 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.View commentSubmission; - - /// <summary> - /// OpenIdAjaxTextBox1 control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::DotNetOpenAuth.OpenId.RelyingParty.OpenIdAjaxTextBox OpenIdAjaxTextBox1; - - /// <summary> - /// openidRequiredValidator 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.RequiredFieldValidator openidRequiredValidator; - - /// <summary> - /// emailAddressBox 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.TextBox emailAddressBox; - - /// <summary> - /// commentsBox 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.TextBox commentsBox; - - /// <summary> - /// submitButton 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.Button submitButton; - - /// <summary> - /// commentSubmitted 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.View commentSubmitted; - - /// <summary> - /// emailLabel 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 emailLabel; - - /// <summary> - /// commentFailed 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.View commentFailed; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/favicon.ico b/samples/OpenIdRelyingPartyWebForms/favicon.ico Binary files differdeleted file mode 100644 index e227dbe..0000000 --- a/samples/OpenIdRelyingPartyWebForms/favicon.ico +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebForms/images/DotNetOpenAuth.png b/samples/OpenIdRelyingPartyWebForms/images/DotNetOpenAuth.png Binary files differdeleted file mode 100644 index 442b986..0000000 --- a/samples/OpenIdRelyingPartyWebForms/images/DotNetOpenAuth.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebForms/images/attention.png b/samples/OpenIdRelyingPartyWebForms/images/attention.png Binary files differdeleted file mode 100644 index 8003700..0000000 --- a/samples/OpenIdRelyingPartyWebForms/images/attention.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebForms/images/openid_login.png b/samples/OpenIdRelyingPartyWebForms/images/openid_login.png Binary files differdeleted file mode 100644 index caebd58..0000000 --- a/samples/OpenIdRelyingPartyWebForms/images/openid_login.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebForms/images/yahoo.png b/samples/OpenIdRelyingPartyWebForms/images/yahoo.png Binary files differdeleted file mode 100644 index 3129217..0000000 --- a/samples/OpenIdRelyingPartyWebForms/images/yahoo.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebForms/login.aspx b/samples/OpenIdRelyingPartyWebForms/login.aspx deleted file mode 100644 index fc42b73..0000000 --- a/samples/OpenIdRelyingPartyWebForms/login.aspx +++ /dev/null @@ -1,38 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="login.aspx.cs" Inherits="OpenIdRelyingPartyWebForms.login" - ValidateRequest="false" MasterPageFile="~/Site.Master" Async="true" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="rp" %> -<%@ Register Assembly="DotNetOpenAuth.OpenId" Namespace="DotNetOpenAuth.OpenId.Extensions.SimpleRegistration" TagPrefix="sreg" %> -<asp:Content runat="server" ContentPlaceHolderID="Main"> - <h2>Login Page </h2> - <rp:OpenIdLogin ID="OpenIdLogin1" runat="server" CssClass="openid_login" RequestCountry="Request" - RequestEmail="Require" RequestGender="Require" RequestPostalCode="Require" RequestTimeZone="Require" - RememberMeVisible="True" PolicyUrl="~/PrivacyPolicy.aspx" TabIndex="1" - OnLoggedIn="OpenIdLogin1_LoggedIn" OnLoggingIn="OpenIdLogin1_LoggingIn" /> - <fieldset title="Knobs"> - <asp:CheckBox ID="requireSslCheckBox" runat="server" - Text="RequireSsl (high security) mode" - oncheckedchanged="requireSslCheckBox_CheckedChanged" /><br /> - <h4 style="margin-top: 0; margin-bottom: 0">PAPE policies</h4> - <asp:CheckBoxList runat="server" ID="papePolicies"> - <asp:ListItem Text="Request phishing resistant authentication" Value="http://schemas.openid.net/pape/policies/2007/06/phishing-resistant" /> - <asp:ListItem Text="Request multi-factor authentication" Value="http://schemas.openid.net/pape/policies/2007/06/multi-factor" /> - <asp:ListItem Text="Request physical multi-factor authentication" Value="http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical" /> - <asp:ListItem Text="Request PPID identifier" Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier" /> - </asp:CheckBoxList> - <p>Request that the Provider have authenticated the user in the last - <asp:TextBox runat="server" ID="maxAuthTimeBox" MaxLength="4" Columns="4" /> - seconds. - </p> - <p>Try the PPID identifier functionality against the OpenIDProviderMvc sample.</p> - </fieldset> - <p><a href="loginGoogleApps.aspx">Log in using Google Apps for Domains</a>. </p> - <p> - <rp:OpenIdButton runat="server" ImageUrl="~/images/yahoo.png" Text="Login with Yahoo!" ID="yahooLoginButton" - Identifier="https://me.yahoo.com/" OnLoggingIn="OpenIdLogin1_LoggingIn" OnLoggedIn="OpenIdLogin1_LoggedIn"> - <Extensions> - <sreg:ClaimsRequest Email="Require" /> - </Extensions> - </rp:OpenIdButton> - </p> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/login.aspx.cs b/samples/OpenIdRelyingPartyWebForms/login.aspx.cs deleted file mode 100644 index 3b5466c..0000000 --- a/samples/OpenIdRelyingPartyWebForms/login.aspx.cs +++ /dev/null @@ -1,64 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Collections.Generic; - using System.Web.UI; - using System.Web.UI.WebControls; - using DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy; - using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class login : System.Web.UI.Page { - protected void Page_Load(object sender, EventArgs e) { - this.OpenIdLogin1.Focus(); - } - - protected void requireSslCheckBox_CheckedChanged(object sender, EventArgs e) { - this.OpenIdLogin1.RequireSsl = this.requireSslCheckBox.Checked; - } - - protected void OpenIdLogin1_LoggingIn(object sender, OpenIdEventArgs e) { - this.prepareRequest(e.Request); - } - - /// <summary> - /// Fired upon login. - /// </summary> - /// <param name="sender">The source of the event.</param> - /// <param name="e">The <see cref="DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs"/> instance containing the event data.</param> - /// <remarks> - /// Note, that straight after login, forms auth will redirect the user - /// to their original page. So this page may never be rendererd. - /// </remarks> - protected void OpenIdLogin1_LoggedIn(object sender, OpenIdEventArgs e) { - State.FriendlyLoginName = e.Response.FriendlyIdentifierForDisplay; - State.ProfileFields = e.Response.GetExtension<ClaimsResponse>(); - State.PapePolicies = e.Response.GetExtension<PolicyResponse>(); - } - - private void prepareRequest(IAuthenticationRequest request) { - // Collect the PAPE policies requested by the user. - List<string> policies = new List<string>(); - foreach (ListItem item in this.papePolicies.Items) { - if (item.Selected) { - policies.Add(item.Value); - } - } - - // Add the PAPE extension if any policy was requested. - var pape = new PolicyRequest(); - if (policies.Count > 0) { - foreach (string policy in policies) { - pape.PreferredPolicies.Add(policy); - } - } - - if (this.maxAuthTimeBox.Text.Length > 0) { - pape.MaximumAuthenticationAge = TimeSpan.FromSeconds(double.Parse(this.maxAuthTimeBox.Text)); - } - - if (pape.PreferredPolicies.Count > 0 || pape.MaximumAuthenticationAge.HasValue) { - request.AddExtension(pape); - } - } - } -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/login.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/login.aspx.designer.cs deleted file mode 100644 index 9ee9edc..0000000 --- a/samples/OpenIdRelyingPartyWebForms/login.aspx.designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 login { - - /// <summary> - /// OpenIdLogin1 control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::DotNetOpenAuth.OpenId.RelyingParty.OpenIdLogin OpenIdLogin1; - - /// <summary> - /// requireSslCheckBox 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 requireSslCheckBox; - - /// <summary> - /// papePolicies 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.CheckBoxList papePolicies; - - /// <summary> - /// maxAuthTimeBox 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.TextBox maxAuthTimeBox; - - /// <summary> - /// yahooLoginButton control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::DotNetOpenAuth.OpenId.RelyingParty.OpenIdButton yahooLoginButton; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx b/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx deleted file mode 100644 index cde9966..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="loginGoogleApps.aspx.cs" - Inherits="OpenIdRelyingPartyWebForms.loginGoogleApps" ValidateRequest="false" - MasterPageFile="~/Site.Master" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" - TagPrefix="rp" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <rp:OpenIdLogin ID="OpenIdLogin1" runat="server" ExampleUrl="yourname@yourdomain.com" - TabIndex="1" LabelText="Google Apps email address or domain:" - RegisterVisible="False" onloggedin="OpenIdLogin1_LoggedIn" /> - <asp:Panel runat="server" ID="fullTrustRequired" EnableViewState="false"> - <b>STOP:</b> Full trust permissions are required for Google Apps support - due to certificate chain verification requirements. - Modify web.config to allow full trust before trying this sample. - </asp:Panel> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx.cs b/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx.cs deleted file mode 100644 index 8c84b40..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Collections.Generic; - using System.Linq; - using System.Security; - using System.Security.Permissions; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - using DotNetOpenAuth.OpenId; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class loginGoogleApps : System.Web.UI.Page { - private static readonly HostMetaDiscoveryService GoogleAppsDiscovery = new HostMetaDiscoveryService { - UseGoogleHostedHostMeta = true, - }; - - private static readonly OpenIdRelyingParty relyingParty; - - static loginGoogleApps() { - relyingParty = new OpenIdRelyingParty(); - - // We don't necessarily HAVE to clear the other discovery services, but - // because host-meta discovery (particularly with Google) can cause ambiguity - // in knowing which discovered endpoints are authoritative. Because of the - // extra security concerns it's a good idea to have a separate box - relyingParty.DiscoveryServices.Clear(); - relyingParty.DiscoveryServices.Insert(0, GoogleAppsDiscovery); // it should be first if we don't clear the other discovery services - } - - protected void Page_Load(object sender, EventArgs e) { - this.OpenIdLogin1.RelyingParty = relyingParty; - this.OpenIdLogin1.Focus(); - - this.fullTrustRequired.Visible = IsPartiallyTrusted(); - } - - protected void OpenIdLogin1_LoggedIn(object sender, OpenIdEventArgs e) { - State.FriendlyLoginName = e.Response.FriendlyIdentifierForDisplay; - } - - private static bool IsPartiallyTrusted() { - try { - new SecurityPermission(PermissionState.Unrestricted).Demand(); - return false; - } catch (SecurityException) { - return true; - } - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx.designer.cs deleted file mode 100644 index 54223bb..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginGoogleApps.aspx.designer.cs +++ /dev/null @@ -1,33 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 loginGoogleApps { - - /// <summary> - /// OpenIdLogin1 control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::DotNetOpenAuth.OpenId.RelyingParty.OpenIdLogin OpenIdLogin1; - - /// <summary> - /// fullTrustRequired 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.Panel fullTrustRequired; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx b/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx deleted file mode 100644 index 6c3f822..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx +++ /dev/null @@ -1,30 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="loginPlusOAuth.aspx.cs" - Inherits="OpenIdRelyingPartyWebForms.loginPlusOAuth" ValidateRequest="false" - MasterPageFile="~/Site.Master" Async="true" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" - TagPrefix="rp" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Login Page </h2> - <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex='0'> - <asp:View ID="View1" runat="server"> - <p><b>Important note:</b> Do <b>not</b> check the "Allow [this site] to remember me" - check box while Google is asking for verification. Doing so will make this - sample only work once for your account. If you do check it, you can restore this - sample's functionality by <a href="https://www.google.com/accounts/IssuedAuthSubTokens"> - revoking access</a> to this site from your Google Account. </p> - <asp:Button ID="beginButton" runat="server" Text="Login and get Gmail Contacts" OnClick="beginButton_Click" /> - <p>Due to the way Google matches realms and consumer keys, this demo will only work - when it is run under http://demo.dotnetopenauth.net/. By registering your own consumer - key with Google and changing the configuration of this sample, you can run it on - your own public web site, but it can never work from a private (localhost or firewall-protected) - address. </p> - </asp:View> - <asp:View ID="AuthorizationDenied" runat="server"> - Authentication succeeded, but Gmail Contacts access was denied. - </asp:View> - <asp:View ID="AuthenticationFailed" runat="server"> - Authentication failed or was canceled. - </asp:View> - </asp:MultiView> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx.cs b/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx.cs deleted file mode 100644 index ecfaf49..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx.cs +++ /dev/null @@ -1,87 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Threading.Tasks; - using System.Web; - using System.Web.Security; - using System.Web.UI; - - using DotNetOpenAuth.ApplicationBlock; - using DotNetOpenAuth.OAuth; - using DotNetOpenAuth.OAuth.Messages; - using DotNetOpenAuth.OpenId; - using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class loginPlusOAuth : System.Web.UI.Page { - private const string GoogleOPIdentifier = "https://www.google.com/accounts/o8/id"; - private static readonly OpenIdRelyingParty relyingParty = new OpenIdRelyingParty(); - - protected void Page_Load(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - if (!IsPostBack && string.Equals(Request.Url.Host, "localhost", StringComparison.OrdinalIgnoreCase)) { - // Disable the button since the scenario won't work under localhost, - // and this will help encourage the user to read the the text above the button. - this.beginButton.Enabled = false; - } - - IAuthenticationResponse authResponse = - await relyingParty.GetResponseAsync(new HttpRequestWrapper(Request), Response.ClientDisconnectedToken); - if (authResponse != null) { - switch (authResponse.Status) { - case AuthenticationStatus.Authenticated: - State.FetchResponse = authResponse.GetExtension<FetchResponse>(); - AccessTokenResponse accessToken = - await Global.GoogleWebConsumer.ProcessUserAuthorizationAsync(authResponse, Response.ClientDisconnectedToken); - if (accessToken != null) { - State.GoogleAccessToken = accessToken.AccessToken; - FormsAuthentication.SetAuthCookie(authResponse.ClaimedIdentifier, false); - Response.Redirect("~/MembersOnly/DisplayGoogleContacts.aspx"); - } else { - MultiView1.SetActiveView(AuthorizationDenied); - } - break; - case AuthenticationStatus.Canceled: - case AuthenticationStatus.Failed: - default: - this.MultiView1.SetActiveView(this.AuthenticationFailed); - break; - } - } - })); - } - - protected void beginButton_Click(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - var request = await this.GetGoogleRequestAsync(); - await request.RedirectToProviderAsync(); - })); - } - - private async Task<IAuthenticationRequest> GetGoogleRequestAsync() { - // Google requires that the realm and consumer key be equal, - // so we constrain the realm to match the realm in the web.config file. - // This does mean that the return_to URL must also fall under the key, - // which means this sample will only work on a public web site - // that is properly registered with Google. - // We will customize the realm to use http or https based on what the - // return_to URL will be (which will be this page). - Realm realm = Request.Url.Scheme + Uri.SchemeDelimiter + (new GoogleConsumer()).ConsumerKey + "/"; - IAuthenticationRequest authReq = await relyingParty.CreateRequestAsync(GoogleOPIdentifier, realm, cancellationToken: Response.ClientDisconnectedToken); - - // Prepare the OAuth extension - string scope = GoogleConsumer.GetScopeUri(GoogleConsumer.Applications.Contacts); - Global.GoogleWebConsumer.AttachAuthorizationRequest(authReq, scope); - - // We also want the user's email address - var fetch = new FetchRequest(); - fetch.Attributes.AddRequired(WellKnownAttributes.Contact.Email); - authReq.AddExtension(fetch); - - return authReq; - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx.designer.cs deleted file mode 100644 index a9624fe..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuth.aspx.designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 loginPlusOAuth { - - /// <summary> - /// MultiView1 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.MultiView MultiView1; - - /// <summary> - /// View1 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.View View1; - - /// <summary> - /// beginButton 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.Button beginButton; - - /// <summary> - /// AuthorizationDenied 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.View AuthorizationDenied; - - /// <summary> - /// AuthenticationFailed 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.View AuthenticationFailed; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx b/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx deleted file mode 100644 index 4647939..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx +++ /dev/null @@ -1,34 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="loginPlusOAuthSampleOP.aspx.cs" - Inherits="OpenIdRelyingPartyWebForms.loginPlusOAuthSampleOP" ValidateRequest="false" - MasterPageFile="~/Site.Master" Async="true" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" - TagPrefix="rp" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Login Page </h2> - <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex='0'> - <asp:View ID="View1" runat="server"> - <asp:Label runat="server" Text="OpenIdProviderWebForms sample's OP Identifier or Claimed Identifier: " /> - <rp:OpenIdTextBox runat="server" ID="identifierBox" Text="http://localhost:4860/" - OnLoggingIn="identifierBox_LoggingIn" OnLoggedIn="identifierBox_LoggedIn" OnCanceled="identifierBox_Failed" - OnFailed="identifierBox_Failed" /> - <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="required" - ControlToValidate="identifierBox" /> - <br /> - <asp:Button ID="beginButton" runat="server" Text="Login + OAuth request" OnClick="beginButton_Click" /> - </asp:View> - <asp:View ID="AuthorizationGiven" runat="server"> - Authentication succeeded, and OAuth access was granted. - <p>The actual login step is aborted since this sample focuses on the process only - up to this point.</p> - </asp:View> - <asp:View ID="AuthorizationDenied" runat="server"> - Authentication succeeded, but OAuth access was denied. - <p>The actual login step is aborted since this sample focuses on the process only - up to this point.</p> - </asp:View> - <asp:View ID="AuthenticationFailed" runat="server"> - Authentication failed or was canceled. - </asp:View> - </asp:MultiView> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx.cs b/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx.cs deleted file mode 100644 index 0446c36..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx.cs +++ /dev/null @@ -1,75 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Web; - using System.Web.Security; - using System.Web.UI; - - using DotNetOpenAuth.ApplicationBlock; - using DotNetOpenAuth.Messaging; - using DotNetOpenAuth.OAuth; - using DotNetOpenAuth.OAuth.ChannelElements; - using DotNetOpenAuth.OAuth.Messages; - using DotNetOpenAuth.OpenId; - using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class loginPlusOAuthSampleOP : System.Web.UI.Page { - protected void Page_Load(object sender, EventArgs e) { - } - - protected void beginButton_Click(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - if (!Page.IsValid) { - return; - } - - await this.identifierBox.LogOnAsync(Response.ClientDisconnectedToken); - })); - } - - protected void identifierBox_LoggingIn(object sender, OpenIdEventArgs e) { - var consumer = CreateConsumer(); - consumer.AttachAuthorizationRequest(e.Request, "http://tempuri.org/IDataApi/GetName"); - } - - protected void identifierBox_LoggedIn(object sender, OpenIdEventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - State.FetchResponse = e.Response.GetExtension<FetchResponse>(); - - var serviceDescription = new ServiceProviderDescription { - TokenRequestEndpoint = new Uri(e.Response.Provider.Uri, "/access_token.ashx"), - }; - var consumer = CreateConsumer(); - consumer.ServiceProvider = serviceDescription; - AccessTokenResponse accessToken = await consumer.ProcessUserAuthorizationAsync(e.Response); - if (accessToken != null) { - this.MultiView1.SetActiveView(this.AuthorizationGiven); - - // At this point, the access token would be somehow associated with the user - // account at the RP. - ////Database.Associate(e.Response.ClaimedIdentifier, accessToken.AccessToken); - } else { - this.MultiView1.SetActiveView(this.AuthorizationDenied); - } - - // Avoid the redirect - e.Cancel = true; - })); - } - - protected void identifierBox_Failed(object sender, OpenIdEventArgs e) { - this.MultiView1.SetActiveView(this.AuthenticationFailed); - } - - private static WebConsumerOpenIdRelyingParty CreateConsumer() { - var consumer = new WebConsumerOpenIdRelyingParty(); - consumer.ConsumerKey = new Uri(HttpContext.Current.Request.Url, HttpContext.Current.Request.ApplicationPath).AbsoluteUri; - consumer.ConsumerSecret = "some crazy secret"; - return consumer; - } - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx.designer.cs deleted file mode 100644 index a81b441..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginPlusOAuthSampleOP.aspx.designer.cs +++ /dev/null @@ -1,87 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 loginPlusOAuthSampleOP { - - /// <summary> - /// MultiView1 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.MultiView MultiView1; - - /// <summary> - /// View1 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.View View1; - - /// <summary> - /// identifierBox control. - /// </summary> - /// <remarks> - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// </remarks> - protected global::DotNetOpenAuth.OpenId.RelyingParty.OpenIdTextBox identifierBox; - - /// <summary> - /// RequiredFieldValidator1 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.RequiredFieldValidator RequiredFieldValidator1; - - /// <summary> - /// beginButton 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.Button beginButton; - - /// <summary> - /// AuthorizationGiven 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.View AuthorizationGiven; - - /// <summary> - /// AuthorizationDenied 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.View AuthorizationDenied; - - /// <summary> - /// AuthenticationFailed 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.View AuthenticationFailed; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx deleted file mode 100644 index 3e8d631..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx +++ /dev/null @@ -1,15 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loginProgrammatic.aspx.cs" Async="true" - Inherits="OpenIdRelyingPartyWebForms.loginProgrammatic" MasterPageFile="~/Site.Master" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Login Page </h2> - <asp:Label ID="Label1" runat="server" Text="OpenID Login" /> - <asp:TextBox ID="openIdBox" runat="server" /> - <asp:Button ID="loginButton" runat="server" Text="Login" OnClick="loginButton_Click" /> - <asp:CustomValidator runat="server" ID="openidValidator" ErrorMessage="Invalid OpenID Identifier" - ControlToValidate="openIdBox" EnableViewState="false" OnServerValidate="openidValidator_ServerValidate" /> - <br /> - <asp:Label ID="loginFailedLabel" runat="server" EnableViewState="False" Text="Login failed" - Visible="False" /> - <asp:Label ID="loginCanceledLabel" runat="server" EnableViewState="False" Text="Login canceled" - Visible="False" /> -</asp:Content>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.cs b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.cs deleted file mode 100644 index f47eae0..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.cs +++ /dev/null @@ -1,126 +0,0 @@ -namespace OpenIdRelyingPartyWebForms { - using System; - using System.Net; - using System.Web; - using System.Web.Security; - using System.Web.UI; - using System.Web.UI.WebControls; - using DotNetOpenAuth.Messaging; - using DotNetOpenAuth.OpenId; - using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - using DotNetOpenAuth.OpenId.RelyingParty; - - public partial class loginProgrammatic : System.Web.UI.Page { - protected void openidValidator_ServerValidate(object source, ServerValidateEventArgs args) { - // This catches common typos that result in an invalid OpenID Identifier. - args.IsValid = Identifier.IsValid(args.Value); - } - - protected void loginButton_Click(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - if (!this.Page.IsValid) { - return; // don't login if custom validation failed. - } - try { - using (OpenIdRelyingParty openid = this.createRelyingParty()) { - IAuthenticationRequest request = - await - openid.CreateRequestAsync( - this.openIdBox.Text, new HttpRequestWrapper(Request), Response.ClientDisconnectedToken); - - // This is where you would add any OpenID extensions you wanted - // to include in the authentication request. - request.AddExtension( - new ClaimsRequest { - Country = DemandLevel.Request, - Email = DemandLevel.Request, - Gender = DemandLevel.Require, - PostalCode = DemandLevel.Require, - TimeZone = DemandLevel.Require, - }); - - // Send your visitor to their Provider for authentication. - await request.RedirectToProviderAsync(new HttpContextWrapper(Context), Response.ClientDisconnectedToken); - } - } catch (ProtocolException ex) { - // The user probably entered an Identifier that - // was not a valid OpenID endpoint. - this.openidValidator.Text = ex.Message; - this.openidValidator.IsValid = false; - } - })); - } - - protected void Page_Load(object sender, EventArgs e) { - this.RegisterAsyncTask( - new PageAsyncTask( - async ct => { - this.openIdBox.Focus(); - - // For debugging/testing, we allow remote clearing of all associations... - // NOT a good idea on a production site. - if (Request.QueryString["clearAssociations"] == "1") { - Application.Remove("DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.ApplicationStore"); - - // Force a redirect now to prevent the user from logging in while associations - // are constantly being cleared. - UriBuilder builder = new UriBuilder(Request.Url); - builder.Query = null; - Response.Redirect(builder.Uri.AbsoluteUri); - } - - OpenIdRelyingParty openid = this.createRelyingParty(); - var response = await openid.GetResponseAsync(new HttpRequestWrapper(Request), Response.ClientDisconnectedToken); - if (response != null) { - switch (response.Status) { - case AuthenticationStatus.Authenticated: - // This is where you would look for any OpenID extension responses included - // in the authentication assertion. - var claimsResponse = response.GetExtension<ClaimsResponse>(); - State.ProfileFields = claimsResponse; - - // Store off the "friendly" username to display -- NOT for username lookup - State.FriendlyLoginName = response.FriendlyIdentifierForDisplay; - - // Use FormsAuthentication to tell ASP.NET that the user is now logged in, - // with the OpenID Claimed Identifier as their username. - FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, false); - break; - case AuthenticationStatus.Canceled: - this.loginCanceledLabel.Visible = true; - break; - case AuthenticationStatus.Failed: - this.loginFailedLabel.Visible = true; - break; - - // We don't need to handle SetupRequired because we're not setting - // IAuthenticationRequest.Mode to immediate mode. - ////case AuthenticationStatus.SetupRequired: - //// break; - } - } - })); - } - - private OpenIdRelyingParty createRelyingParty() { - OpenIdRelyingParty openid = new OpenIdRelyingParty(); - int minsha, maxsha, minversion; - if (int.TryParse(Request.QueryString["minsha"], out minsha)) { - openid.SecuritySettings.MinimumHashBitLength = minsha; - } - if (int.TryParse(Request.QueryString["maxsha"], out maxsha)) { - openid.SecuritySettings.MaximumHashBitLength = maxsha; - } - if (int.TryParse(Request.QueryString["minversion"], out minversion)) { - switch (minversion) { - case 1: openid.SecuritySettings.MinimumRequiredOpenIdVersion = ProtocolVersion.V10; break; - case 2: openid.SecuritySettings.MinimumRequiredOpenIdVersion = ProtocolVersion.V20; break; - default: throw new ArgumentOutOfRangeException("minversion"); - } - } - return openid; - } - } -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs b/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs deleted file mode 100644 index d180211..0000000 --- a/samples/OpenIdRelyingPartyWebForms/loginProgrammatic.aspx.designer.cs +++ /dev/null @@ -1,69 +0,0 @@ -//------------------------------------------------------------------------------ -// <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 loginProgrammatic { - - /// <summary> - /// Label1 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 Label1; - - /// <summary> - /// openIdBox 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.TextBox openIdBox; - - /// <summary> - /// loginButton 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.Button loginButton; - - /// <summary> - /// openidValidator 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.CustomValidator openidValidator; - - /// <summary> - /// loginFailedLabel 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 loginFailedLabel; - - /// <summary> - /// loginCanceledLabel 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 loginCanceledLabel; - } -} diff --git a/samples/OpenIdRelyingPartyWebForms/logout.aspx b/samples/OpenIdRelyingPartyWebForms/logout.aspx deleted file mode 100644 index 156f800..0000000 --- a/samples/OpenIdRelyingPartyWebForms/logout.aspx +++ /dev/null @@ -1,14 +0,0 @@ -<%@ Page Language="C#" %> -<%@ Import Namespace="OpenIdRelyingPartyWebForms" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<script runat="server"> - protected void Page_Load(object sender, EventArgs e) { - State.FriendlyLoginName = null; - State.ProfileFields = null; - System.Web.Security.FormsAuthentication.SignOut(); - DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingPartyControlBase.LogOff(); - Response.Redirect("~/"); - } -</script> - diff --git a/samples/OpenIdRelyingPartyWebForms/packages.config b/samples/OpenIdRelyingPartyWebForms/packages.config deleted file mode 100644 index ea83ad2..0000000 --- a/samples/OpenIdRelyingPartyWebForms/packages.config +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> - <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> - <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> - <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> -</packages>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/styles.css b/samples/OpenIdRelyingPartyWebForms/styles.css deleted file mode 100644 index 2e4d3db..0000000 --- a/samples/OpenIdRelyingPartyWebForms/styles.css +++ /dev/null @@ -1,10 +0,0 @@ -h2 -{ - font-style: italic; -} - -body -{ - font-family: Cambria, Arial, Times New Roman; - font-size: 12pt; -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebForms/xrds.aspx b/samples/OpenIdRelyingPartyWebForms/xrds.aspx deleted file mode 100644 index 55b5e35..0000000 --- a/samples/OpenIdRelyingPartyWebForms/xrds.aspx +++ /dev/null @@ -1,29 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" ContentType="application/xrds+xml" %><?xml version="1.0" encoding="UTF-8"?> -<%-- -This page is a required for relying party discovery per OpenID 2.0. -It allows Providers to call back to the relying party site to confirm the -identity that it is claiming in the realm and return_to URLs. -This page should be pointed to by the 'realm' home page, which in this sample -is default.aspx. ---%> -<xrds:XRDS - xmlns:xrds="xri://$xrds" - xmlns:openid="http://openid.net/xmlns/1.0" - xmlns="xri://$xrd*($v*2.0)"> - <XRD> - <Service priority="1"> - <Type>http://specs.openid.net/auth/2.0/return_to</Type> - <%-- Every page with an OpenID login should be listed here. --%> - <URI priority="1"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/login.aspx"))%></URI> - <URI priority="2"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginProgrammatic.aspx"))%></URI> - <URI priority="3"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/ajaxlogin.aspx"))%></URI> - <URI priority="4"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/NoIdentityOpenId.aspx"))%></URI> - <URI priority="5"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginPlusOAuth.aspx"))%></URI> - <URI priority="6"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginPlusOAuthSampleOP.aspx"))%></URI> - </Service> - <Service> - <Type>http://specs.openid.net/extensions/ui/icon</Type> - <URI><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/images/DotNetOpenAuth.png"))%></URI> - </Service> - </XRD> -</xrds:XRDS> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Code/State.vb b/samples/OpenIdRelyingPartyWebFormsVB/Code/State.vb deleted file mode 100644 index e00cb4f..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Code/State.vb +++ /dev/null @@ -1,46 +0,0 @@ -Imports DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy -Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration -Imports DotNetOpenAuth.OpenId.Extensions.AttributeExchange - -Public Class State - Public Shared Property ProfileFields() As ClaimsResponse - Get - Return HttpContext.Current.Session("ProfileFields") - End Get - Set(ByVal value As ClaimsResponse) - HttpContext.Current.Session("ProfileFields") = value - End Set - End Property - - Public Shared Property FetchResponse() As FetchResponse - Get - Return HttpContext.Current.Session("FetchResponse") - End Get - Set(ByVal value As FetchResponse) - HttpContext.Current.Session("FetchResponse") = value - End Set - End Property - - Public Shared Property FriendlyLoginName() As String - Get - Return HttpContext.Current.Session("FriendlyLoginName") - End Get - Set(ByVal value As String) - HttpContext.Current.Session("FriendlyLoginName") = value - End Set - End Property - - Public Shared Property PapePolicies() As PolicyResponse - Get - Return HttpContext.Current.Session("PapePolicies") - End Get - Set(ByVal value As PolicyResponse) - HttpContext.Current.Session("PapePolicies") = value - End Set - End Property - - Public Shared Sub Clear() - FriendlyLoginName = Nothing - End Sub - -End Class diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb b/samples/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb deleted file mode 100644 index dfc2db5..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Code/TracePageAppender.vb +++ /dev/null @@ -1,10 +0,0 @@ -Imports System.IO - -Public Class TracePageAppender - Inherits log4net.Appender.AppenderSkeleton - - Protected Overrides Sub Append(ByVal loggingEvent As log4net.Core.LoggingEvent) - Dim sw As StringWriter = New StringWriter(Global_asax.LogMessages) - Layout.Format(sw, loggingEvent) - End Sub -End Class
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx b/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx deleted file mode 100644 index 12ccfd0..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx +++ /dev/null @@ -1,18 +0,0 @@ -<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="OpenIdRelyingPartyWebFormsVB._Default" - MasterPageFile="~/Site.Master" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.UI" Namespace="DotNetOpenAuth" TagPrefix="openid" %> -<asp:Content runat="server" ContentPlaceHolderID="head"> - <openid:XrdsPublisher ID="XrdsPublisher1" runat="server" XrdsUrl="~/xrds.aspx" /> -</asp:Content> -<asp:Content runat="server" ContentPlaceHolderID="main"> - <h2> - Relying Party - </h2> - <p> - Visit the - <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/MembersOnly/Default.aspx" - Text="Members Only" /> - area. (This will trigger a login demo). - </p> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb deleted file mode 100644 index ce59c43..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx.designer.vb +++ /dev/null @@ -1,26 +0,0 @@ -'------------------------------------------------------------------------------ -' <auto-generated> -' This code was generated by a tool. -' Runtime Version:2.0.50727.4927 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' </auto-generated> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - -Partial Public Class _Default - - '''<summary> - '''form1 control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents form1 As Global.System.Web.UI.HtmlControls.HtmlForm -End Class diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb b/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb deleted file mode 100644 index 3e023c0..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Default.aspx.vb +++ /dev/null @@ -1,8 +0,0 @@ -Partial Public Class _Default - Inherits System.Web.UI.Page - - Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load - - End Sub - -End Class
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Global.asax b/samples/OpenIdRelyingPartyWebFormsVB/Global.asax deleted file mode 100644 index 92716f1..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Codebehind="Global.asax.vb" Inherits="OpenIdRelyingPartyWebFormsVB.Global_asax" Language="vb" %> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Global.asax.vb b/samples/OpenIdRelyingPartyWebFormsVB/Global.asax.vb deleted file mode 100644 index 97b0d51..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Global.asax.vb +++ /dev/null @@ -1,64 +0,0 @@ -Imports System -Imports System.Collections.Specialized -Imports System.Configuration -Imports System.IO -Imports System.Text -Imports System.Web -Imports OpenIdRelyingPartyWebFormsVB - -Public Class Global_asax - Inherits HttpApplication - - Public Shared Logger As log4net.ILog = log4net.LogManager.GetLogger(GetType(Global_asax)) - - Friend Shared LogMessages As StringBuilder = New StringBuilder - - Public Shared Function CollectionToString(ByVal collection As NameValueCollection) As String - Dim sw As StringWriter = New StringWriter - For Each key As String In collection.Keys - sw.WriteLine("{0} = '{1}'", key, collection(key)) - Next - Return sw.ToString - End Function - - Protected Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) - log4net.Config.XmlConfigurator.Configure() - Logger.Info("Sample starting...") - End Sub - - Protected Sub Application_End(ByVal sender As Object, ByVal e As EventArgs) - Logger.Info("Sample shutting down...") - ' this would be automatic, but in partial trust scenarios it is not. - log4net.LogManager.Shutdown() - End Sub - - Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) - ' System.Diagnostics.Debugger.Launch(); - Logger.DebugFormat("Processing {0} on {1} ", Request.HttpMethod, stripQueryString(Request.Url)) - If (Request.QueryString.Count > 0) Then - Logger.DebugFormat("Querystring follows: " & vbLf & "{0}", CollectionToString(Request.QueryString)) - End If - If (Request.Form.Count > 0) Then - Logger.DebugFormat("Posted form follows: " & vbLf & "{0}", CollectionToString(Request.Form)) - End If - End Sub - - Protected Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs) - Logger.DebugFormat("User {0} authenticated.", (Not (HttpContext.Current.User) Is Nothing)) - 'TODO: Warning!!!, inline IF is not supported ? - End Sub - - Protected Sub Application_EndRequest(ByVal sender As Object, ByVal e As EventArgs) - - End Sub - - Protected Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) - Logger.ErrorFormat("An unhandled exception was raised. Details follow: {0}", HttpContext.Current.Server.GetLastError) - End Sub - - Private Shared Function stripQueryString(ByVal uri As Uri) As String - Dim builder As UriBuilder = New UriBuilder(uri) - builder.Query = Nothing - Return builder.ToString - End Function -End Class
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx b/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx deleted file mode 100644 index 25538e8..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx +++ /dev/null @@ -1,28 +0,0 @@ -<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb" Inherits="OpenIdRelyingPartyWebFormsVB.Login" Async="true" - ValidateRequest="false" MasterPageFile="~/Site.Master" %> - -<%@ Register Assembly="DotNetOpenAuth.OpenId.RelyingParty.UI" Namespace="DotNetOpenAuth.OpenId.RelyingParty" TagPrefix="rp" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Login Page </h2> - <rp:OpenIdLogin ID="OpenIdLogin1" runat="server" CssClass="openid_login" RequestCountry="Request" - RequestEmail="Require" RequestGender="Require" RequestPostalCode="Require" RequestTimeZone="Require" - RememberMeVisible="True" PolicyUrl="~/PrivacyPolicy.aspx" TabIndex="1" /> - <fieldset title="Knobs"> - <asp:CheckBox ID="requireSslCheckBox" runat="server" - Text="RequireSsl (high security) mode" - oncheckedchanged="requireSslCheckBox_CheckedChanged" /><br /> - <h4 style="margin-top: 0; margin-bottom: 0">PAPE policies</h4> - <asp:CheckBoxList runat="server" ID="papePolicies"> - <asp:ListItem Text="Request phishing resistant authentication" Value="http://schemas.openid.net/pape/policies/2007/06/phishing-resistant" /> - <asp:ListItem Text="Request multi-factor authentication" Value="http://schemas.openid.net/pape/policies/2007/06/multi-factor" /> - <asp:ListItem Text="Request physical multi-factor authentication" Value="http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical" /> - <asp:ListItem Text="Request PPID identifier" Value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier" /> - </asp:CheckBoxList> - <p>Try the PPID identifier functionality against the OpenIDProviderMvc sample.</p> - </fieldset> - <p><a href="loginGoogleApps.aspx">Log in using Google Apps for Domains</a>. </p> - <p> - <rp:OpenIdButton runat="server" ImageUrl="~/images/yahoo.png" Text="Login with Yahoo!" ID="yahooLoginButton" - Identifier="https://me.yahoo.com/" OnLoggingIn="OpenIdLogin1_LoggingIn" OnLoggedIn="OpenIdLogin1_LoggedIn" /> - </p> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb deleted file mode 100644 index 4cf1a96..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx.designer.vb +++ /dev/null @@ -1,53 +0,0 @@ -'------------------------------------------------------------------------------ -' <auto-generated> -' This code was generated by a tool. -' Runtime Version:2.0.50727.4927 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' </auto-generated> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - -Partial Public Class Login - - '''<summary> - '''OpenIdLogin1 control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents OpenIdLogin1 As Global.DotNetOpenAuth.OpenId.RelyingParty.OpenIdLogin - - '''<summary> - '''requireSslCheckBox control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents requireSslCheckBox As Global.System.Web.UI.WebControls.CheckBox - - '''<summary> - '''papePolicies control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents papePolicies As Global.System.Web.UI.WebControls.CheckBoxList - - '''<summary> - '''yahooLoginButton control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents yahooLoginButton As Global.DotNetOpenAuth.OpenId.RelyingParty.OpenIdButton -End Class diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb b/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb deleted file mode 100644 index 339f62c..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Login.aspx.vb +++ /dev/null @@ -1,52 +0,0 @@ -Imports DotNetOpenAuth.OpenId.Extensions.ProviderAuthenticationPolicy -Imports DotNetOpenAuth.OpenId.RelyingParty -Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration - -Partial Public Class Login - Inherits System.Web.UI.Page - - Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load - OpenIdLogin1.Focus() - End Sub - - Protected Sub requireSslCheckBox_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) - OpenIdLogin1.RequireSsl = requireSslCheckBox.Checked - End Sub - - Protected Sub OpenIdLogin1_LoggingIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs) Handles OpenIdLogin1.LoggingIn - prepareRequest(e.Request) - End Sub - - ''' <summary> - ''' Fired upon login. - ''' </summary> - ''' <param name="sender">The source of the event.</param> - ''' <param name="e">The <see cref="DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs"/> instance containing the event data.</param> - ''' <remarks> - ''' Note, that straight after login, forms auth will redirect the user - ''' to their original page. So this page may never be rendererd. - ''' </remarks> - Protected Sub OpenIdLogin1_LoggedIn(ByVal sender As Object, ByVal e As DotNetOpenAuth.OpenId.RelyingParty.OpenIdEventArgs) Handles OpenIdLogin1.LoggedIn - State.FriendlyLoginName = e.Response.FriendlyIdentifierForDisplay - State.ProfileFields = e.Response.GetExtension(Of ClaimsResponse)() - State.PapePolicies = e.Response.GetExtension(Of PolicyResponse)() - End Sub - - Private Sub prepareRequest(ByVal request As IAuthenticationRequest) - ' Collect the PAPE policies requested by the user. - Dim policies As New List(Of String) - For Each item As ListItem In Me.papePolicies.Items - If item.Selected Then - policies.Add(item.Value) - End If - Next - ' Add the PAPE extension if any policy was requested. - If (policies.Count > 0) Then - Dim pape As New PolicyRequest - For Each policy As String In policies - pape.PreferredPolicies.Add(policy) - Next - request.AddExtension(pape) - End If - End Sub -End Class
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx b/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx deleted file mode 100644 index becc9a0..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx +++ /dev/null @@ -1,15 +0,0 @@ -<%@ Page Language="vb" AutoEventWireup="true" CodeBehind="loginProgrammatic.aspx.vb" Async="true" - Inherits="OpenIdRelyingPartyWebFormsVB.LoginProgrammatic" MasterPageFile="~/Site.Master" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Login Page </h2> - <asp:Label ID="Label1" runat="server" Text="OpenID Login" /> - <asp:TextBox ID="openIdBox" runat="server" /> - <asp:Button ID="loginButton" runat="server" Text="Login" OnClick="loginButton_Click" /> - <asp:CustomValidator runat="server" ID="openidValidator" ErrorMessage="Invalid OpenID Identifier" - ControlToValidate="openIdBox" EnableViewState="false" OnServerValidate="openidValidator_ServerValidate" /> - <br /> - <asp:Label ID="loginFailedLabel" runat="server" EnableViewState="False" Text="Login failed" - Visible="False" /> - <asp:Label ID="loginCanceledLabel" runat="server" EnableViewState="False" Text="Login canceled" - Visible="False" /> -</asp:Content>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb deleted file mode 100644 index e747a88..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.designer.vb +++ /dev/null @@ -1,69 +0,0 @@ -'------------------------------------------------------------------------------ -' <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> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Partial Public Class LoginProgrammatic - - '''<summary> - '''Label1 control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents Label1 As Global.System.Web.UI.WebControls.Label - - '''<summary> - '''openIdBox control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents openIdBox As Global.System.Web.UI.WebControls.TextBox - - '''<summary> - '''loginButton control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents loginButton As Global.System.Web.UI.WebControls.Button - - '''<summary> - '''openidValidator control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents openidValidator As Global.System.Web.UI.WebControls.CustomValidator - - '''<summary> - '''loginFailedLabel control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents loginFailedLabel As Global.System.Web.UI.WebControls.Label - - '''<summary> - '''loginCanceledLabel control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents loginCanceledLabel As Global.System.Web.UI.WebControls.Label -End Class diff --git a/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb b/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb deleted file mode 100644 index b3c1620..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/LoginProgrammatic.aspx.vb +++ /dev/null @@ -1,77 +0,0 @@ -Imports System.Net -Imports System.Threading -Imports System.Web.Security -Imports DotNetOpenAuth.Messaging -Imports DotNetOpenAuth.OpenId -Imports DotNetOpenAuth.OpenId.Extensions.SimpleRegistration -Imports DotNetOpenAuth.OpenId.RelyingParty - -Public Class LoginProgrammatic - Inherits System.Web.UI.Page - - Private Shared relyingParty As New OpenIdRelyingParty - - Protected Sub openidValidator_ServerValidate(ByVal source As Object, ByVal args As ServerValidateEventArgs) - ' This catches common typos that result in an invalid OpenID Identifier. - args.IsValid = Identifier.IsValid(args.Value) - End Sub - - Protected Async Sub loginButton_Click(ByVal sender As Object, ByVal e As EventArgs) - If Not Me.Page.IsValid Then - Return - ' don't login if custom validation failed. - End If - Try - Dim request As IAuthenticationRequest = Await relyingParty.CreateRequestAsync(Me.openIdBox.Text) - ' This is where you would add any OpenID extensions you wanted - ' to include in the authentication request. - request.AddExtension(New ClaimsRequest() With { _ - .Country = DemandLevel.Request, _ - .Email = DemandLevel.Request, _ - .Gender = DemandLevel.Require, _ - .PostalCode = DemandLevel.Require, _ - .TimeZone = DemandLevel.Require _ - }) - ' Send your visitor to their Provider for authentication. - Await request.RedirectToProviderAsync() - Catch ex As ProtocolException - ' The user probably entered an Identifier that - ' was not a valid OpenID endpoint. - Me.openidValidator.Text = ex.Message - Me.openidValidator.IsValid = False - End Try - End Sub - - Protected Async Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load - Me.openIdBox.Focus() - ' For debugging/testing, we allow remote clearing of all associations... - ' NOT a good idea on a production site. - If (Request.QueryString("clearAssociations") = "1") Then - Application.Remove("DotNetOpenAuth.OpenId.RelyingParty.OpenIdRelyingParty.ApplicationStore") - ' Force a redirect now to prevent the user from logging in while associations - ' are constantly being cleared. - Dim builder As UriBuilder = New UriBuilder(Request.Url) - builder.Query = Nothing - Me.Response.Redirect(builder.Uri.AbsoluteUri) - End If - Dim response As IAuthenticationResponse = Await relyingParty.GetResponseAsync(New HttpRequestWrapper(Request)) - If response IsNot Nothing Then - Select Case response.Status - Case AuthenticationStatus.Authenticated - ' This is where you would look for any OpenID extension responses included - ' in the authentication assertion. - Dim claimsResponse As ClaimsResponse = response.GetExtension(Of ClaimsResponse)() - State.ProfileFields = claimsResponse - ' Store off the "friendly" username to display -- NOT for username lookup - State.FriendlyLoginName = response.FriendlyIdentifierForDisplay - ' Use FormsAuthentication to tell ASP.NET that the user is now logged in, - ' with the OpenID Claimed Identifier as their username. - FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, False) - Case AuthenticationStatus.Canceled - Me.loginCanceledLabel.Visible = True - Case AuthenticationStatus.Failed - Me.loginFailedLabel.Visible = True - End Select - End If - End Sub -End Class
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx b/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx deleted file mode 100644 index 441ef84..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/Default.aspx +++ /dev/null @@ -1,34 +0,0 @@ -<%@ Page Language="VB" AutoEventWireup="true" MasterPageFile="~/Site.Master" %> -<%@ Import Namespace="OpenIdRelyingPartyWebFormsVB" %> -<%@ Register Src="~/MembersOnly/ProfileFieldsDisplay.ascx" TagPrefix="cc1" TagName="ProfileFieldsDisplay" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2> - Members Only Area - </h2> - <p> - Congratulations, <b><asp:LoginName ID="LoginName1" runat="server" /></b>. - You have completed the OpenID login process. - </p> - -<% If (State.PapePolicies IsNot Nothing) Then%> - <p>A PAPE extension was included in the authentication with this content: </p> - <ul> - <% If (State.PapePolicies.NistAssuranceLevel.HasValue) Then%> - <li>Nist: <%=HttpUtility.HtmlEncode(State.PapePolicies.NistAssuranceLevel.Value.ToString())%></li> - <% End If - For Each policy As String In State.PapePolicies.ActualPolicies%> - <li><%=HttpUtility.HtmlEncode(policy)%></li> - <% Next%> - </ul> -<% End If %> - -<% If State.ProfileFields IsNot Nothing Then - profileFieldsDisplay.ProfileValues = State.ProfileFields%> - <p> - In addition to authenticating you, your OpenID Provider may - have told us something about you using the - Simple Registration extension: - </p> - <cc1:ProfileFieldsDisplay runat="server" ID="profileFieldsDisplay" /> -<% End If%> -</asp:Content> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx b/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx deleted file mode 100644 index f6864e9..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/ProfileFieldsDisplay.ascx +++ /dev/null @@ -1,91 +0,0 @@ -<%@ Control Language="VB" AutoEventWireup="true" %> -<%@ Import Namespace="DotNetOpenAuth.OpenId.Extensions.SimpleRegistration" %> - -<script runat="server"> - - Private _profileValues As ClaimsResponse - Public Property ProfileValues() As ClaimsResponse - Get - Return _profileValues - End Get - Set(ByVal value As ClaimsResponse) - _profileValues = value - End Set - End Property - -</script> - -<table id="profileFieldsTable" runat="server"> - <tr> - <td> - Nickname - </td> - <td> - <%=ProfileValues.Nickname %> - </td> - </tr> - <tr> - <td> - Email - </td> - <td> - <%=ProfileValues.Email%> - </td> - </tr> - <tr> - <td> - FullName - </td> - <td> - <%=ProfileValues.FullName%> - </td> - </tr> - <tr> - <td> - Date of Birth - </td> - <td> - <%=ProfileValues.BirthDate.ToString()%> - </td> - </tr> - <tr> - <td> - Gender - </td> - <td> - <%=ProfileValues.Gender.ToString()%> - </td> - </tr> - <tr> - <td> - Post Code - </td> - <td> - <%=ProfileValues.PostalCode%> - </td> - </tr> - <tr> - <td> - Country - </td> - <td> - <%=ProfileValues.Country%> - </td> - </tr> - <tr> - <td> - Language - </td> - <td> - <%=ProfileValues.Language%> - </td> - </tr> - <tr> - <td> - Timezone - </td> - <td> - <%=ProfileValues.TimeZone%> - </td> - </tr> -</table> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config b/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config deleted file mode 100644 index 3cfad05..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/MembersOnly/Web.config +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0"?> -<!-- - Note: As an alternative to hand editing this file you can use the - web admin tool to configure settings for your application. Use - the Website->Asp.Net Configuration option in Visual Studio. - A full list of settings and comments can be found in - machine.config.comments usually located in - \Windows\Microsoft.Net\Framework\v2.x\Config ---> -<configuration> - <appSettings/> - <connectionStrings/> - <system.web> - <authorization> - <deny users="?"/> - </authorization> - </system.web> -</configuration> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb deleted file mode 100644 index cbb8d1e..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Application.Designer.vb +++ /dev/null @@ -1,13 +0,0 @@ -'------------------------------------------------------------------------------ -' <auto-generated> -' This code was generated by a tool. -' Runtime Version:4.0.30319.17614 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' </auto-generated> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp b/samples/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp deleted file mode 100644 index 758895d..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Application.myapp +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <MySubMain>false</MySubMain> - <SingleInstance>false</SingleInstance> - <ShutdownMode>0</ShutdownMode> - <EnableVisualStyles>true</EnableVisualStyles> - <AuthenticationMode>0</AuthenticationMode> - <ApplicationType>1</ApplicationType> - <SaveMySettingsOnExit>true</SaveMySettingsOnExit> -</MyApplicationData> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb b/samples/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb deleted file mode 100644 index 813551f..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,34 +0,0 @@ -Imports System -Imports System.Reflection -Imports System.Runtime.InteropServices - -' 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. - -' Review the values of the assembly attributes -<Assembly: AssemblyTitle("OpenIdRelyingPartyWebFormsVB")> -<Assembly: AssemblyDescription("")> -<Assembly: AssemblyCompany("")> -<Assembly: AssemblyProduct("OpenIdRelyingPartyWebFormsVB")> -<Assembly: AssemblyCopyright("Copyright © 2010")> -<Assembly: AssemblyTrademark("")> - -<Assembly: ComVisible(False)> - -'The following GUID is for the ID of the typelib if this project is exposed to COM -<Assembly: Guid("334e9cee-0d47-4d70-924b-b5098a3432cb")> - -' 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/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb b/samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb deleted file mode 100644 index 78c7c19..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/MyExtensions/MyWebExtension.vb +++ /dev/null @@ -1,73 +0,0 @@ -#If _MyType <> "Empty" Then - -Namespace My - ''' <summary> - ''' Module used to define the properties that are available in the My Namespace for Web projects. - ''' </summary> - ''' <remarks></remarks> - <Global.Microsoft.VisualBasic.HideModuleName()> _ - Module MyWebExtension - Private s_Computer As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Devices.ServerComputer) - Private s_User As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.ApplicationServices.WebUser) - Private s_Log As New ThreadSafeObjectProvider(Of Global.Microsoft.VisualBasic.Logging.AspLog) - ''' <summary> - ''' Returns information about the host computer. - ''' </summary> - <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ - Friend ReadOnly Property Computer() As Global.Microsoft.VisualBasic.Devices.ServerComputer - Get - Return s_Computer.GetInstance() - End Get - End Property - ''' <summary> - ''' Returns information for the current Web user. - ''' </summary> - <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ - Friend ReadOnly Property User() As Global.Microsoft.VisualBasic.ApplicationServices.WebUser - Get - Return s_User.GetInstance() - End Get - End Property - ''' <summary> - ''' Returns Request object. - ''' </summary> - <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ - <Global.System.ComponentModel.Design.HelpKeyword("My.Request")> _ - Friend ReadOnly Property Request() As Global.System.Web.HttpRequest - <Global.System.Diagnostics.DebuggerHidden()> _ - Get - Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current - If CurrentContext IsNot Nothing Then - Return CurrentContext.Request - End If - Return Nothing - End Get - End Property - ''' <summary> - ''' Returns Response object. - ''' </summary> - <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ - <Global.System.ComponentModel.Design.HelpKeyword("My.Response")> _ - Friend ReadOnly Property Response() As Global.System.Web.HttpResponse - <Global.System.Diagnostics.DebuggerHidden()> _ - Get - Dim CurrentContext As Global.System.Web.HttpContext = Global.System.Web.HttpContext.Current - If CurrentContext IsNot Nothing Then - Return CurrentContext.Response - End If - Return Nothing - End Get - End Property - ''' <summary> - ''' Returns the Asp log object. - ''' </summary> - <Global.System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")> _ - Friend ReadOnly Property Log() As Global.Microsoft.VisualBasic.Logging.AspLog - Get - Return s_Log.GetInstance() - End Get - End Property - End Module -End Namespace - -#End If
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb deleted file mode 100644 index e2a555b..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Resources.Designer.vb +++ /dev/null @@ -1,63 +0,0 @@ -'------------------------------------------------------------------------------ -' <auto-generated> -' This code was generated by a tool. -' Runtime Version:4.0.30319.17614 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' </auto-generated> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - -Imports System - -Namespace My.Resources - - 'This class was auto-generated by the StronglyTypedResourceBuilder - 'class via a tool like ResGen or Visual Studio. - 'To add or remove a member, edit your .ResX file then rerun ResGen - 'with the /str option, or rebuild your VS project. - '''<summary> - ''' A strongly-typed resource class, for looking up localized strings, etc. - '''</summary> - <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ - Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ - Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ - Friend Module Resources - - Private resourceMan As Global.System.Resources.ResourceManager - - Private resourceCulture As Global.System.Globalization.CultureInfo - - '''<summary> - ''' Returns the cached ResourceManager instance used by this class. - '''</summary> - <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager - Get - If Object.ReferenceEquals(resourceMan, Nothing) Then - Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("OpenIdRelyingPartyWebFormsVB.Resources", GetType(Resources).Assembly) - resourceMan = temp - End If - Return resourceMan - End Get - End Property - - '''<summary> - ''' Overrides the current thread's CurrentUICulture property for all - ''' resource lookups using this strongly typed resource class. - '''</summary> - <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Friend Property Culture() As Global.System.Globalization.CultureInfo - Get - Return resourceCulture - End Get - Set - resourceCulture = value - End Set - End Property - End Module -End Namespace diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx b/samples/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb deleted file mode 100644 index 1493ab0..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Settings.Designer.vb +++ /dev/null @@ -1,73 +0,0 @@ -'------------------------------------------------------------------------------ -' <auto-generated> -' This code was generated by a tool. -' Runtime Version:4.0.30319.17614 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' </auto-generated> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - -Namespace My - - <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ - Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ - Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) - -#Region "My.Settings Auto-Save Functionality" -#If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean - - Private Shared addedHandlerLockObject As New Object - - <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub -#End If -#End Region - - Public Shared ReadOnly Property [Default]() As MySettings - Get - -#If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If -#End If - Return defaultInstance - End Get - End Property - End Class -End Namespace - -Namespace My - - <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ - Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ - Friend Module MySettingsProperty - - <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ - Friend ReadOnly Property Settings() As Global.OpenIdRelyingPartyWebFormsVB.My.MySettings - Get - Return Global.OpenIdRelyingPartyWebFormsVB.My.MySettings.Default - End Get - End Property - End Module -End Namespace diff --git a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings b/samples/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings deleted file mode 100644 index 85b890b..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/My Project/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true"> - <Profiles> - <Profile Name="(Default)" /> - </Profiles> - <Settings /> -</SettingsFile> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj b/samples/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj deleted file mode 100644 index 1387233..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/OpenIdRelyingPartyWebFormsVB.vbproj +++ /dev/null @@ -1,267 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))\EnlistmentInfo.props" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.props))' != '' " /> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> - <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> - <TargetFrameworkProfile /> - <IISExpressSSLPort /> - <IISExpressAnonymousAuthentication>disabled</IISExpressAnonymousAuthentication> - <IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication> - <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode> - <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\src\</SolutionDir> - </PropertyGroup> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{F289B925-4307-4BEC-B411-885CE70E3379}</ProjectGuid> - <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <RootNamespace>OpenIdRelyingPartyWebFormsVB</RootNamespace> - <AssemblyName>OpenIdRelyingPartyWebFormsVB</AssemblyName> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> - <MyType>Custom</MyType> - <OptionExplicit>On</OptionExplicit> - <OptionCompare>Binary</OptionCompare> - <OptionStrict>Off</OptionStrict> - <OptionInfer>On</OptionInfer> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>4.0</OldToolsVersion> - <UpgradeBackupLocation /> - <UseIISExpress>true</UseIISExpress> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <DefineDebug>true</DefineDebug> - <DefineTrace>true</DefineTrace> - <OutputPath>bin\</OutputPath> - <DocumentationFile>OpenIdRelyingPartyWebFormsVB.xml</DocumentationFile> - <NoWarn>41999,42016,42020,42021,42022,42353,42354,42355</NoWarn> - <WarningsAsErrors>42017,42018,42019,42032,42036</WarningsAsErrors> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <DefineDebug>false</DefineDebug> - <DefineTrace>true</DefineTrace> - <Optimize>true</Optimize> - <OutputPath>bin\</OutputPath> - <DocumentationFile>OpenIdRelyingPartyWebFormsVB.xml</DocumentationFile> - <NoWarn>41999,42016,42020,42021,42022,42353,42354,42355</NoWarn> - <WarningsAsErrors>42017,42018,42019,42032,42036</WarningsAsErrors> - <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> - </PropertyGroup> - <ItemGroup> - <Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\src\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Net.Http.Extensions"> - <HintPath>..\..\src\packages\Microsoft.Net.Http.2.2.15\lib\net45\System.Net.Http.Extensions.dll</HintPath> - </Reference> - <Reference Include="System.Net.Http.Primitives"> - <HintPath>..\..\src\packages\Microsoft.Net.Http.2.2.15\lib\net45\System.Net.Http.Primitives.dll</HintPath> - </Reference> - <Reference Include="System.Net.Http.WebRequest" /> - <Reference Include="System.Web.ApplicationServices" /> - <Reference Include="System.Web.DynamicData" /> - <Reference Include="System.Web.Entity" /> - <Reference Include="System.Web.Extensions" /> - <Reference Include="System.Web" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Configuration" /> - <Reference Include="System.Web.Services" /> - <Reference Include="System.EnterpriseServices" /> - <Reference Include="System.Web.Mobile" /> - <Reference Include="System.Xml.Linq" /> - </ItemGroup> - <ItemGroup> - <Import Include="Microsoft.VisualBasic" /> - <Import Include="System" /> - <Import Include="System.Collections" /> - <Import Include="System.Collections.Generic" /> - <Import Include="System.Data" /> - <Import Include="System.Linq" /> - <Import Include="System.Xml.Linq" /> - <Import Include="System.Diagnostics" /> - <Import Include="System.Collections.Specialized" /> - <Import Include="System.Configuration" /> - <Import Include="System.Text" /> - <Import Include="System.Text.RegularExpressions" /> - <Import Include="System.Web" /> - <Import Include="System.Web.Caching" /> - <Import Include="System.Web.SessionState" /> - <Import Include="System.Web.Security" /> - <Import Include="System.Web.Profile" /> - <Import Include="System.Web.UI" /> - <Import Include="System.Web.UI.WebControls" /> - <Import Include="System.Web.UI.WebControls.WebParts" /> - <Import Include="System.Web.UI.HtmlControls" /> - </ItemGroup> - <ItemGroup> - <Content Include="Default.aspx" /> - <Content Include="images\openid_login.png" /> - <Content Include="Login.aspx" /> - <Content Include="Web.config"> - <SubType>Designer</SubType> - </Content> - </ItemGroup> - <ItemGroup> - <Compile Include="Code\State.vb" /> - <Compile Include="Code\TracePageAppender.vb" /> - <Compile Include="Default.aspx.vb"> - <SubType>ASPXCodeBehind</SubType> - <DependentUpon>Default.aspx</DependentUpon> - </Compile> - <Compile Include="Default.aspx.designer.vb"> - <DependentUpon>Default.aspx</DependentUpon> - </Compile> - <Compile Include="Global.asax.vb"> - <DependentUpon>Global.asax</DependentUpon> - </Compile> - <Compile Include="Login.aspx.designer.vb"> - <DependentUpon>Login.aspx</DependentUpon> - </Compile> - <Compile Include="Login.aspx.vb"> - <DependentUpon>Login.aspx</DependentUpon> - <SubType>ASPXCodebehind</SubType> - </Compile> - <Compile Include="LoginProgrammatic.aspx.designer.vb"> - <DependentUpon>LoginProgrammatic.aspx</DependentUpon> - </Compile> - <Compile Include="LoginProgrammatic.aspx.vb"> - <DependentUpon>LoginProgrammatic.aspx</DependentUpon> - <SubType>ASPXCodebehind</SubType> - </Compile> - <Compile Include="My Project\AssemblyInfo.vb" /> - <Compile Include="My Project\Application.Designer.vb"> - <AutoGen>True</AutoGen> - <DependentUpon>Application.myapp</DependentUpon> - </Compile> - <Compile Include="My Project\MyExtensions\MyWebExtension.vb"> - <VBMyExtensionTemplateID>Microsoft.VisualBasic.Web.MyExtension</VBMyExtensionTemplateID> - <VBMyExtensionTemplateVersion>1.0.0.0</VBMyExtensionTemplateVersion> - </Compile> - <Compile Include="My Project\Resources.Designer.vb"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Include="My Project\Settings.Designer.vb"> - <AutoGen>True</AutoGen> - <DependentUpon>Settings.settings</DependentUpon> - <DesignTimeSharedInput>True</DesignTimeSharedInput> - </Compile> - <Compile Include="TracePage.aspx.designer.vb"> - <DependentUpon>TracePage.aspx</DependentUpon> - </Compile> - <Compile Include="TracePage.aspx.vb"> - <DependentUpon>TracePage.aspx</DependentUpon> - <SubType>ASPXCodebehind</SubType> - </Compile> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="My Project\Resources.resx"> - <Generator>VbMyResourcesResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.vb</LastGenOutput> - <CustomToolNamespace>My.Resources</CustomToolNamespace> - <SubType>Designer</SubType> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <Content Include="Global.asax" /> - <Content Include="LoginProgrammatic.aspx" /> - <Content Include="MembersOnly\ProfileFieldsDisplay.ascx" /> - <Content Include="MembersOnly\Web.config" /> - <None Include="My Project\Application.myapp"> - <Generator>MyApplicationCodeGenerator</Generator> - <LastGenOutput>Application.Designer.vb</LastGenOutput> - </None> - <None Include="My Project\Settings.settings"> - <Generator>SettingsSingleFileGenerator</Generator> - <CustomToolNamespace>My</CustomToolNamespace> - <LastGenOutput>Settings.Designer.vb</LastGenOutput> - </None> - <Content Include="favicon.ico" /> - <Content Include="images\attention.png" /> - <Content Include="images\DotNetOpenAuth.png" /> - <Content Include="images\yahoo.png" /> - <Content Include="MembersOnly\Default.aspx" /> - <Content Include="PrivacyPolicy.aspx" /> - <Content Include="Site.Master" /> - <Content Include="styles.css" /> - <Content Include="TracePage.aspx" /> - <Content Include="xrds.aspx" /> - <Content Include="packages.config" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\src\DotNetOpenAuth.Core\DotNetOpenAuth.Core.csproj"> - <Project>{60426312-6AE5-4835-8667-37EDEA670222}</Project> - <Name>DotNetOpenAuth.Core</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId.RelyingParty.UI\DotNetOpenAuth.OpenId.RelyingParty.UI.csproj"> - <Project>{1ED8D424-F8AB-4050-ACEB-F27F4F909484}</Project> - <Name>DotNetOpenAuth.OpenId.RelyingParty.UI</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId.RelyingParty\DotNetOpenAuth.OpenId.RelyingParty.csproj"> - <Project>{F458AB60-BA1C-43D9-8CEF-EC01B50BE87B}</Project> - <Name>DotNetOpenAuth.OpenId.RelyingParty</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId.UI\DotNetOpenAuth.OpenId.UI.csproj"> - <Project>{75e13aae-7d51-4421-abfd-3f3dc91f576e}</Project> - <Name>DotNetOpenAuth.OpenId.UI</Name> - </ProjectReference> - <ProjectReference Include="..\..\src\DotNetOpenAuth.OpenId\DotNetOpenAuth.OpenId.csproj"> - <Project>{3896A32A-E876-4C23-B9B8-78E17D134CD3}</Project> - <Name>DotNetOpenAuth.OpenId</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <Folder Include="App_Data\" /> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /> - <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> - <!-- 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> - --> - <ProjectExtensions> - <VisualStudio> - <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> - <WebProjectProperties> - <UseIIS>True</UseIIS> - <AutoAssignPort>True</AutoAssignPort> - <DevelopmentServerPort>27433</DevelopmentServerPort> - <DevelopmentServerVPath>/</DevelopmentServerVPath> - <IISUrl>http://localhost:27433/</IISUrl> - <NTLMAuthentication>False</NTLMAuthentication> - <UseCustomServer>False</UseCustomServer> - <CustomServerUrl> - </CustomServerUrl> - <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> - </WebProjectProperties> - </FlavorProperties> - </VisualStudio> - </ProjectExtensions> - <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))\EnlistmentInfo.targets" Condition=" '$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), EnlistmentInfo.targets))' != '' " /> - <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> - <Import Project="..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" /> - <Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''"> - <Error Condition="!Exists('..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=317567." HelpKeyword="BCLBUILD2001" /> - <Error Condition="Exists('..\..\src\packages\Microsoft.Bcl.Build.1.0.10\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" /> - </Target> -</Project>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx b/samples/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx deleted file mode 100644 index 7b72cd4..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/PrivacyPolicy.aspx +++ /dev/null @@ -1,7 +0,0 @@ -<%@ Page Language="VB" AutoEventWireup="true" MasterPageFile="~/Site.Master" %> -<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="Main"> - <h2>Privacy Policy</h2> - <p> - Some privacy policy would go here. - </p> -</asp:Content>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Site.Master b/samples/OpenIdRelyingPartyWebFormsVB/Site.Master deleted file mode 100644 index 7a92712..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Site.Master +++ /dev/null @@ -1,39 +0,0 @@ -<%@ Master Language="VB" AutoEventWireup="true" %> -<%@ Import Namespace="OpenIdRelyingPartyWebFormsVB" %> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<script runat="server"> - Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) - friendlyUsername.Text = State.FriendlyLoginName - End Sub - - Protected Sub LoginStatus1_LoggedOut(ByVal sender As Object, ByVal e As EventArgs) - State.Clear() - End Sub -</script> - -<html xmlns="http://www.w3.org/1999/xhtml"> -<head runat="server"> - <title>OpenID Relying Party, by DotNetOpenAuth</title> - <link href="styles.css" rel="stylesheet" type="text/css" /> - <asp:ContentPlaceHolder ID="head" runat="server" /> -</head> -<body> - <form id="form1" runat="server"> - <span style="float: right"> - <asp:Image runat="server" ID="openIdUsernameImage" ImageUrl="~/images/openid_login.png" - EnableViewState="false" /> - <asp:Label runat="server" ID="friendlyUsername" Text="" EnableViewState="false" /> - <asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" /> - </span> - <div> - <a href="http://dotnetopenauth.net"> - <img runat="server" src="~/images/DotNetOpenAuth.png" title="Jump to the project web site." - alt="DotNetOpenAuth" border='0' /></a> - </div> - <div> - <asp:ContentPlaceHolder ID="Main" runat="server" /> - </div> - </form> -</body> -</html> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx b/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx deleted file mode 100644 index 8df914b..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx +++ /dev/null @@ -1,16 +0,0 @@ -<%@ Page Language="VB" AutoEventWireup="true" CodeBehind="TracePage.aspx.vb" Inherits="OpenIdRelyingPartyWebFormsVB.TracePage" %> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head id="Head1" runat="server"> - <title></title> -</head> -<body> - <form id="form1" runat="server"> - <p align="right"> - <asp:Button runat="server" Text="Clear log" ID="clearLogButton" OnClick="clearLogButton_Click" /> - </p> - <pre><asp:PlaceHolder runat="server" ID="placeHolder1" /></pre> - </form> -</body> -</html> diff --git a/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb b/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb deleted file mode 100644 index 9928c68..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.designer.vb +++ /dev/null @@ -1,53 +0,0 @@ -'------------------------------------------------------------------------------ -' <auto-generated> -' This code was generated by a tool. -' Runtime Version:2.0.50727.4927 -' -' Changes to this file may cause incorrect behavior and will be lost if -' the code is regenerated. -' </auto-generated> -'------------------------------------------------------------------------------ - -Option Strict On -Option Explicit On - - - -Partial Public Class TracePage - - '''<summary> - '''Head1 control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents Head1 As Global.System.Web.UI.HtmlControls.HtmlHead - - '''<summary> - '''form1 control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents form1 As Global.System.Web.UI.HtmlControls.HtmlForm - - '''<summary> - '''clearLogButton control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents clearLogButton As Global.System.Web.UI.WebControls.Button - - '''<summary> - '''placeHolder1 control. - '''</summary> - '''<remarks> - '''Auto-generated field. - '''To modify move field declaration from designer file to code-behind file. - '''</remarks> - Protected WithEvents placeHolder1 As Global.System.Web.UI.WebControls.PlaceHolder -End Class diff --git a/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb b/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb deleted file mode 100644 index 9a1b8c1..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/TracePage.aspx.vb +++ /dev/null @@ -1,13 +0,0 @@ -Public Class TracePage - Inherits System.Web.UI.Page - - Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) - Me.placeHolder1.Controls.Add(New Label() With {.Text = HttpUtility.HtmlEncode(Global_asax.LogMessages.ToString())}) - End Sub - - Protected Sub clearLogButton_Click(ByVal sender As Object, ByVal e As EventArgs) - Global_asax.LogMessages.Length = 0 - ' clear the page immediately, and allow for F5 without a Postback warning. - Me.Response.Redirect(Me.Request.Url.AbsoluteUri) - End Sub -End Class
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/Web.config b/samples/OpenIdRelyingPartyWebFormsVB/Web.config deleted file mode 100644 index 7f4fb2f..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/Web.config +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0"?> -<configuration> - <configSections> - <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler" requirePermission="false" /> - <sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core"> - <section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" /> - <section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" /> - <section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" /> - <section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" /> - </sectionGroup> - </configSections> - - <!-- The uri section is necessary to turn on .NET 3.5 support for IDN (international domain names), - which is necessary for OpenID urls with unicode characters in the domain/host name. - It is also required to put the Uri class into RFC 3986 escaping mode, which OpenID and OAuth require. --> - <uri> - <idn enabled="All"/> - <iriParsing enabled="true"/> - </uri> - - <system.net> - <defaultProxy enabled="true" /> - <settings> - <!-- This setting causes .NET to check certificate revocation lists (CRL) - before trusting HTTPS certificates. But this setting tends to not - be allowed in shared hosting environments. --> - <!--<servicePointManager checkCertificateRevocationList="true"/>--> - </settings> - </system.net> - - <!-- this is an optional configuration section where aspects of dotnetopenauth can be customized --> - <dotNetOpenAuth> - <openid> - <relyingParty> - <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). --> - <add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.AXFetchAsSregTransform, DotNetOpenAuth.OpenId.RelyingParty" /> - <!--<add type="DotNetOpenAuth.OpenId.RelyingParty.Behaviors.GsaIcamProfile, DotNetOpenAuth.OpenId.RelyingParty" />--> - </behaviors> - <!-- Uncomment the following to activate the sample custom store. --> - <!--<store type="OpenIdRelyingPartyWebFormsVB.CustomStore, OpenIdRelyingPartyWebFormsVB" />--> - </relyingParty> - </openid> - <messaging> - <untrustedWebRequest> - <whitelistHosts> - <!-- since this is a sample, and will often be used with localhost --> - <add name="localhost" /> - </whitelistHosts> - </untrustedWebRequest> - </messaging> - <!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. --> - <reporting enabled="true" /> - </dotNetOpenAuth> - - <appSettings> - <!-- Fill in your various consumer keys and secrets here to make the sample work. --> - <!-- You must get these values by signing up with each individual service provider. --> - <!-- Google sign-up: https://www.google.com/accounts/ManageDomains --> - <add key="googleConsumerKey" value="demo.dotnetopenauth.net"/> - <add key="googleConsumerSecret" value="5Yv1TfKm1551QrXZ9GpqepeD"/> - <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" /> - </appSettings> - - <system.web> - <httpRuntime targetFramework="4.5" /> - <!--<sessionState cookieless="true" />--> - <compilation debug="true" targetFramework="4.5" /> - <customErrors mode="RemoteOnly"/> - <authentication mode="Forms"> - <forms name="OpenIdRelyingPartyVBSession" loginUrl="loginProgrammatic.aspx"/> <!-- named cookie prevents conflicts with other samples --> - </authentication> - <trace enabled="false" writeToDiagnosticsTrace="true" /> - <!-- Trust level discussion: - Full: everything works (this is required for Google Apps for Domains support) - High: TRACE compilation symbol must NOT be defined - Medium: doesn't work unless originUrl=".*" or WebPermission.Connect is extended, and Google Apps doesn't work. - Low: doesn't work because WebPermission.Connect is denied. - --> - <trust level="Medium" originUrl=".*"/> - <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" /> - </system.web> - - <!-- 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" /> - <appendToFile value="true" /> - <rollingStyle value="Size" /> - <maxSizeRollBackups value="10" /> - <maximumFileSize value="100KB" /> - <staticLogFileName value="true" /> - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" /> - </layout> - </appender> - <appender name="TracePageAppender" type="OpenIdRelyingPartyWebFormsVB.TracePageAppender, OpenIdRelyingPartyWebFormsVB"> - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%date (GMT%date{%z}) [%thread] %-5level %logger - %message%newline" /> - </layout> - </appender> - <!-- Setup the root category, add the appenders and set the default level --> - <root> - <level value="INFO" /> - <!--<appender-ref ref="RollingFileAppender" />--> - <appender-ref ref="TracePageAppender" /> - </root> - <!-- Specify the level for some specific categories --> - <logger name="DotNetOpenAuth"> - <level value="INFO" /> - </logger> - </log4net> - <runtime> - <legacyHMACWarning enabled="0" /> - </runtime> - <system.webServer> - <modules runAllManagedModulesForAllRequests="true" /> - </system.webServer> -</configuration>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/favicon.ico b/samples/OpenIdRelyingPartyWebFormsVB/favicon.ico Binary files differdeleted file mode 100644 index e227dbe..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/favicon.ico +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.png b/samples/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.png Binary files differdeleted file mode 100644 index 442b986..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/images/DotNetOpenAuth.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebFormsVB/images/attention.png b/samples/OpenIdRelyingPartyWebFormsVB/images/attention.png Binary files differdeleted file mode 100644 index 8003700..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/images/attention.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebFormsVB/images/openid_login.png b/samples/OpenIdRelyingPartyWebFormsVB/images/openid_login.png Binary files differdeleted file mode 100644 index caebd58..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/images/openid_login.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebFormsVB/images/yahoo.png b/samples/OpenIdRelyingPartyWebFormsVB/images/yahoo.png Binary files differdeleted file mode 100644 index 3129217..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/images/yahoo.png +++ /dev/null diff --git a/samples/OpenIdRelyingPartyWebFormsVB/packages.config b/samples/OpenIdRelyingPartyWebFormsVB/packages.config deleted file mode 100644 index ea83ad2..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/packages.config +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="log4net" version="2.0.2" targetFramework="net45" /> - <package id="Microsoft.Bcl" version="1.1.3" targetFramework="net45" /> - <package id="Microsoft.Bcl.Build" version="1.0.10" targetFramework="net45" /> - <package id="Microsoft.Net.Http" version="2.2.15" targetFramework="net45" /> -</packages>
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/styles.css b/samples/OpenIdRelyingPartyWebFormsVB/styles.css deleted file mode 100644 index 2e4d3db..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/styles.css +++ /dev/null @@ -1,10 +0,0 @@ -h2 -{ - font-style: italic; -} - -body -{ - font-family: Cambria, Arial, Times New Roman; - font-size: 12pt; -}
\ No newline at end of file diff --git a/samples/OpenIdRelyingPartyWebFormsVB/xrds.aspx b/samples/OpenIdRelyingPartyWebFormsVB/xrds.aspx deleted file mode 100644 index 130ca30..0000000 --- a/samples/OpenIdRelyingPartyWebFormsVB/xrds.aspx +++ /dev/null @@ -1,29 +0,0 @@ -<%@ Page Language="VB" AutoEventWireup="true" ContentType="application/xrds+xml" %><?xml version="1.0" encoding="UTF-8"?> -<%-- -This page is a required for relying party discovery per OpenID 2.0. -It allows Providers to call back to the relying party site to confirm the -identity that it is claiming in the realm and return_to URLs. -This page should be pointed to by the 'realm' home page, which in this sample -is default.aspx. ---%> -<xrds:XRDS - xmlns:xrds="xri://$xrds" - xmlns:openid="http://openid.net/xmlns/1.0" - xmlns="xri://$xrd*($v*2.0)"> - <XRD> - <Service priority="1"> - <Type>http://specs.openid.net/auth/2.0/return_to</Type> - <%-- Every page with an OpenID login should be listed here. --%> - <URI priority="1"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/login.aspx"))%></URI> - <URI priority="2"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginProgrammatic.aspx"))%></URI> - <URI priority="3"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/ajaxlogin.aspx"))%></URI> - <URI priority="4"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/NoIdentityOpenId.aspx"))%></URI> - <URI priority="5"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginPlusOAuth.aspx"))%></URI> - <URI priority="6"><%=new Uri(Request.Url, Response.ApplyAppPathModifier("~/loginPlusOAuthSampleOP.aspx"))%></URI> - </Service> - <Service> - <Type>http://specs.openid.net/extensions/ui/icon</Type> - <URI><%=New Uri(Request.Url, Response.ApplyAppPathModifier("~/images/DotNetOpenAuth.png"))%></URI> - </Service> - </XRD> -</xrds:XRDS> |