diff options
Diffstat (limited to 'src/OAuth/OAuthConsumerWpf')
-rw-r--r-- | src/OAuth/OAuthConsumerWpf/App.config | 192 | ||||
-rw-r--r-- | src/OAuth/OAuthConsumerWpf/Authorize2.xaml.cs | 6 | ||||
-rw-r--r-- | src/OAuth/OAuthConsumerWpf/OAuthConsumerWpf.csproj | 26 | ||||
-rw-r--r-- | src/OAuth/OAuthConsumerWpf/packages.config | 23 |
4 files changed, 133 insertions, 114 deletions
diff --git a/src/OAuth/OAuthConsumerWpf/App.config b/src/OAuth/OAuthConsumerWpf/App.config index 472f77a..36085ab 100644 --- a/src/OAuth/OAuthConsumerWpf/App.config +++ b/src/OAuth/OAuthConsumerWpf/App.config @@ -1,98 +1,106 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="utf-8"?> <configuration> - <configSections> - <section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> - <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), + <configSections> + <section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <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) + <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> - <!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. --> - <reporting enabled="true"/> - - <!-- Relaxing SSL requirements is useful for simple samples, but NOT a good idea in production. --> - <messaging relaxSslRequirements="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="anonymous"/> - <!-- Google requires either a secret or an X.509 certificate. This sample will use + <!--<servicePointManager checkCertificateRevocationList="true"/>--> + </settings> + </system.net> + <!-- this is an optional configuration section where aspects of dotnetopenauth can be customized --> + <dotNetOpenAuth> + <!-- Allow DotNetOpenAuth to publish usage statistics to library authors to improve the library. --> + <reporting enabled="true" /> + <!-- Relaxing SSL requirements is useful for simple samples, but NOT a good idea in production. --> + <messaging relaxSslRequirements="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="anonymous" /> + <!-- Google requires either a secret or an X.509 certificate. This sample will use the certificate if it is specified, otherwise it will use the shared secret. --> - <add key="googleConsumerSecret" value="anonymous"/> - <add key="googleConsumerCertificateFile" value=""/> - <add key="googleConsumerCertificatePassword" value=""/> - </appSettings> - - <log4net> - <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> - <file value="Testing.log"/> - <appendToFile value="true"/> - <rollingStyle value="Size"/> - <maxSizeRollBackups value="10"/> - <maximumFileSize value="1024KB"/> - <staticLogFileName value="true"/> - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%date [%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"/> - </root> - <!-- Specify the level for some specific categories --> - <logger name="DotNetOpenAuth"> - <level value="ALL"/> - </logger> - </log4net> - <system.serviceModel> - <bindings> - <wsHttpBinding> - <binding name="WSHttpBinding_IDataApi" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> - <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384"/> - <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/> - <security mode="Message"> - <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""> - <extendedProtectionPolicy policyEnforcement="Never"/> - </transport> - <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true"/> - </security> - </binding> - </wsHttpBinding> - </bindings> - <client> - <endpoint address="http://localhost:65169/DataApi.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDataApi" contract="WcfSampleService.IDataApi" name="WSHttpBinding_IDataApi"> - <identity> - <dns value="localhost"/> - </identity> - </endpoint> - </client> - </system.serviceModel> -<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> + <add key="googleConsumerSecret" value="anonymous" /> + <add key="googleConsumerCertificateFile" value="" /> + <add key="googleConsumerCertificatePassword" value="" /> + </appSettings> + <log4net> + <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> + <file value="Testing.log" /> + <appendToFile value="true" /> + <rollingStyle value="Size" /> + <maxSizeRollBackups value="10" /> + <maximumFileSize value="1024KB" /> + <staticLogFileName value="true" /> + <layout type="log4net.Layout.PatternLayout"> + <conversionPattern value="%date [%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" /> + </root> + <!-- Specify the level for some specific categories --> + <logger name="DotNetOpenAuth"> + <level value="ALL" /> + </logger> + </log4net> + <system.serviceModel> + <bindings> + <wsHttpBinding> + <binding name="WSHttpBinding_IDataApi" closeTimeout="00:01:00" + openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" + bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" + maxBufferPoolSize="524288" maxReceivedMessageSize="65536" + messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" + allowCookies="false"> + <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" + maxBytesPerRead="4096" maxNameTableCharCount="16384" /> + <reliableSession ordered="true" inactivityTimeout="00:10:00" + enabled="false" /> + <security mode="Message"> + <transport clientCredentialType="Windows" proxyCredentialType="None" + realm=""> + <extendedProtectionPolicy policyEnforcement="Never" /> + </transport> + <message clientCredentialType="Windows" negotiateServiceCredential="true" + algorithmSuite="Default" establishSecurityContext="true" /> + </security> + </binding> + </wsHttpBinding> + </bindings> + <client> + <endpoint address="http://localhost:65169/DataApi.svc" + binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IDataApi" + contract="WcfSampleService.IDataApi" name="WSHttpBinding_IDataApi"> + <identity> + <dns value="localhost" /> + </identity> + </endpoint> + </client> + </system.serviceModel> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /> + </startup> +</configuration>
\ No newline at end of file diff --git a/src/OAuth/OAuthConsumerWpf/Authorize2.xaml.cs b/src/OAuth/OAuthConsumerWpf/Authorize2.xaml.cs index 64a10e2..2787bb7 100644 --- a/src/OAuth/OAuthConsumerWpf/Authorize2.xaml.cs +++ b/src/OAuth/OAuthConsumerWpf/Authorize2.xaml.cs @@ -1,15 +1,13 @@ namespace DotNetOpenAuth.Samples.OAuthConsumerWpf { - using System.Windows; - using DotNetOpenAuth.OAuth2; + + using DotNetOpenAuth.OAuth2; /// <summary> /// Interaction logic for Authorize2.xaml /// </summary> public partial class Authorize2 : Window { internal Authorize2(UserAgentClient client) { - //System.Diagnostics.Contracts.Contract.Requires(client != null, "client"); - this.InitializeComponent(); this.clientAuthorizationView.Client = client; } diff --git a/src/OAuth/OAuthConsumerWpf/OAuthConsumerWpf.csproj b/src/OAuth/OAuthConsumerWpf/OAuthConsumerWpf.csproj index 98e4a82..c318fcb 100644 --- a/src/OAuth/OAuthConsumerWpf/OAuthConsumerWpf.csproj +++ b/src/OAuth/OAuthConsumerWpf/OAuthConsumerWpf.csproj @@ -70,25 +70,37 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="DotNetOpenAuth.Core">
- <HintPath>..\..\..\packages\DotNetOpenAuth.Core.4.0.0.12084\lib\net40-full\DotNetOpenAuth.Core.dll</HintPath>
+ <HintPath>..\..\..\packages\DotNetOpenAuth.Core.4.1.0.12182\lib\net40-full\DotNetOpenAuth.Core.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenAuth.OAuth">
- <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth.Core.4.0.0.12084\lib\net40-full\DotNetOpenAuth.OAuth.dll</HintPath>
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth.Core.4.1.0.12182\lib\net40-full\DotNetOpenAuth.OAuth.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OAuth.Common">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth.Common.4.1.0.12182\lib\net40-full\DotNetOpenAuth.OAuth.Common.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenAuth.OAuth.Consumer">
- <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth.Consumer.4.0.0.12084\lib\net40-full\DotNetOpenAuth.OAuth.Consumer.dll</HintPath>
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth.Consumer.4.1.0.12182\lib\net40-full\DotNetOpenAuth.OAuth.Consumer.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenAuth.OAuth2">
- <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.Core.0.23.0-draft2\lib\net40-full\DotNetOpenAuth.OAuth2.dll</HintPath>
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.Core.0.25.0-draft1\lib\net40-full\DotNetOpenAuth.OAuth2.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OAuth2.AuthorizationServer">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.AuthorizationServer.0.25.0-draft1\lib\net40-full\DotNetOpenAuth.OAuth2.AuthorizationServer.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenAuth.OAuth2.Client">
- <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.Client.0.23.0-draft2\lib\net40-full\DotNetOpenAuth.OAuth2.Client.dll</HintPath>
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.Client.0.25.0-draft1\lib\net40-full\DotNetOpenAuth.OAuth2.Client.dll</HintPath>
</Reference>
<Reference Include="DotNetOpenAuth.OAuth2.Client.UI">
- <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.Client.UI.0.23.0-draft2\lib\net40-full\DotNetOpenAuth.OAuth2.Client.UI.dll</HintPath>
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.Client.UI.0.25.0-draft1\lib\net40-full\DotNetOpenAuth.OAuth2.Client.UI.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OAuth2.ClientAuthorization">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.ClientAuthorization.0.25.0-draft1\lib\net40-full\DotNetOpenAuth.OAuth2.ClientAuthorization.dll</HintPath>
+ </Reference>
+ <Reference Include="DotNetOpenAuth.OAuth2.ResourceServer">
+ <HintPath>..\..\..\packages\DotNetOpenAuth.OAuth2.ResourceServer.0.25.0-draft1\lib\net40-full\DotNetOpenAuth.OAuth2.ResourceServer.dll</HintPath>
</Reference>
<Reference Include="log4net">
- <HintPath>..\..\..\packages\log4net.2.0.0\lib\net35-full\log4net.dll</HintPath>
+ <HintPath>..\..\..\packages\log4net.2.0.0\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Contracts">
<HintPath>..\..\..\packages\CodeContracts.Unofficial.1.0.0.2\lib\net35-client\Microsoft.Contracts.dll</HintPath>
diff --git a/src/OAuth/OAuthConsumerWpf/packages.config b/src/OAuth/OAuthConsumerWpf/packages.config index 23deca0..6c94766 100644 --- a/src/OAuth/OAuthConsumerWpf/packages.config +++ b/src/OAuth/OAuthConsumerWpf/packages.config @@ -1,14 +1,15 @@ <?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="CodeContracts.Unofficial" version="1.0.0.2" />
- <package id="DotNetOpenAuth.Core" version="4.0.0.12084" />
- <package id="DotNetOpenAuth.OAuth.Consumer" version="4.0.0.12084" />
- <package id="DotNetOpenAuth.OAuth.Core" version="4.0.0.12084" />
- <package id="DotNetOpenAuth.OAuth2.Client" version="0.23.0-draft" />
- <package id="DotNetOpenAuth.OAuth2.Client" version="0.23.0-draft2" />
- <package id="DotNetOpenAuth.OAuth2.Client.UI" version="0.23.0-draft" />
- <package id="DotNetOpenAuth.OAuth2.Client.UI" version="0.23.0-draft2" />
- <package id="DotNetOpenAuth.OAuth2.Core" version="0.23.0-draft" />
- <package id="DotNetOpenAuth.OAuth2.Core" version="0.23.0-draft2" />
- <package id="log4net" version="2.0.0" />
+ <package id="CodeContracts.Unofficial" version="1.0.0.2" targetFramework="net40" />
+ <package id="DotNetOpenAuth.Core" version="4.1.0.12182" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth.Common" version="4.1.0.12182" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth.Consumer" version="4.1.0.12182" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth.Core" version="4.1.0.12182" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth2.AuthorizationServer" version="0.25.0-draft1" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth2.Client" version="0.25.0-draft1" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth2.Client.UI" version="0.25.0-draft1" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth2.ClientAuthorization" version="0.25.0-draft1" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth2.Core" version="0.25.0-draft1" targetFramework="net40" />
+ <package id="DotNetOpenAuth.OAuth2.ResourceServer" version="0.25.0-draft1" targetFramework="net40" />
+ <package id="log4net" version="2.0.0" targetFramework="net40" />
</packages>
\ No newline at end of file |