diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2011-07-25 14:04:42 -0600 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2011-07-25 14:04:42 -0600 |
commit | 67689b08f76546b25d4c4bcc68e179d3b02890fc (patch) | |
tree | c2b22986d841fd998bed6aef275f486648337555 /src | |
parent | 1328f88a36187d8aa5890a46e35af59c4df04d3f (diff) | |
download | DotNetOpenAuth-67689b08f76546b25d4c4bcc68e179d3b02890fc.zip DotNetOpenAuth-67689b08f76546b25d4c4bcc68e179d3b02890fc.tar.gz DotNetOpenAuth-67689b08f76546b25d4c4bcc68e179d3b02890fc.tar.bz2 |
More work toward divided OpenID projects.
Diffstat (limited to 'src')
25 files changed, 81 insertions, 42 deletions
diff --git a/src/DotNetOpenAuth.OpenId.Provider/DotNetOpenAuth.OpenId.Provider.csproj b/src/DotNetOpenAuth.OpenId.Provider/DotNetOpenAuth.OpenId.Provider.csproj index 627471f..a888838 100644 --- a/src/DotNetOpenAuth.OpenId.Provider/DotNetOpenAuth.OpenId.Provider.csproj +++ b/src/DotNetOpenAuth.OpenId.Provider/DotNetOpenAuth.OpenId.Provider.csproj @@ -14,6 +14,7 @@ <RootNamespace>DotNetOpenAuth</RootNamespace> <AssemblyName>DotNetOpenAuth.OpenId.Provider</AssemblyName> </PropertyGroup> + <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.Product.props" /> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> diff --git a/src/DotNetOpenAuth.OpenId.Provider/OpenId/ChannelElements/OpenIdProviderChannel.cs b/src/DotNetOpenAuth.OpenId.Provider/OpenId/ChannelElements/OpenIdProviderChannel.cs index 57448d8..795c0eb 100644 --- a/src/DotNetOpenAuth.OpenId.Provider/OpenId/ChannelElements/OpenIdProviderChannel.cs +++ b/src/DotNetOpenAuth.OpenId.Provider/OpenId/ChannelElements/OpenIdProviderChannel.cs @@ -12,6 +12,8 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { using DotNetOpenAuth.OpenId.Provider; using DotNetOpenAuth.Messaging.Bindings; using System.Diagnostics.Contracts; + using DotNetOpenAuth.Messaging; + using DotNetOpenAuth.OpenId.Extensions; internal class OpenIdProviderChannel : OpenIdChannel { /// <summary> @@ -35,8 +37,8 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { /// <param name="nonceStore">The nonce store to use.</param> /// <param name="messageTypeProvider">An object that knows how to distinguish the various OpenID message types for deserialization purposes.</param> /// <param name="securitySettings">The security settings.</param> - private OpenIdChannel(IProviderAssociationStore cryptoKeyStore, INonceStore nonceStore, IMessageFactory messageTypeProvider, ProviderSecuritySettings securitySettings) : - this(messageTypeProvider, InitializeBindingElements(cryptoKeyStore, nonceStore, securitySettings)) { + private OpenIdProviderChannel(IProviderAssociationStore cryptoKeyStore, INonceStore nonceStore, IMessageFactory messageTypeProvider, ProviderSecuritySettings securitySettings) + : base(messageTypeProvider, InitializeBindingElements(cryptoKeyStore, nonceStore, securitySettings)) { Contract.Requires<ArgumentNullException>(cryptoKeyStore != null); Contract.Requires<ArgumentNullException>(messageTypeProvider != null); Contract.Requires<ArgumentNullException>(securitySettings != null); @@ -57,12 +59,12 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { Contract.Requires<ArgumentNullException>(nonceStore != null); SigningBindingElement signingElement; - signingElement = new SigningBindingElement(cryptoKeyStore, securitySettings); + signingElement = new ProviderSigningBindingElement(cryptoKeyStore, securitySettings); var extensionFactory = OpenIdExtensionFactoryAggregator.LoadFromConfiguration(); List<IChannelBindingElement> elements = new List<IChannelBindingElement>(8); - elements.Add(new ExtensionsBindingElement(extensionFactory, securitySettings)); + elements.Add(new ExtensionsBindingElement(extensionFactory, securitySettings, true)); elements.Add(new StandardReplayProtectionBindingElement(nonceStore, true)); elements.Add(new StandardExpirationBindingElement()); elements.Add(signingElement); diff --git a/src/DotNetOpenAuth.OpenId.Provider/OpenId/HmacShaAsssociationProvider.cs b/src/DotNetOpenAuth.OpenId.Provider/OpenId/HmacShaAsssociationProvider.cs index 37e410c..b2c9ef3 100644 --- a/src/DotNetOpenAuth.OpenId.Provider/OpenId/HmacShaAsssociationProvider.cs +++ b/src/DotNetOpenAuth.OpenId.Provider/OpenId/HmacShaAsssociationProvider.cs @@ -13,7 +13,7 @@ namespace DotNetOpenAuth.OpenId { using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OpenId.Provider; - internal static class HmacShaAsssociationProvider : HmacShaAssociation { + internal class HmacShaAsssociationProvider : HmacShaAssociation { /// <summary> /// The default lifetime of a shared association when no lifetime is given /// for a specific association type. diff --git a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Messages/AssociateRequestProvider.cs b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Messages/AssociateRequestProvider.cs index 5da8307..a4449f8 100644 --- a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Messages/AssociateRequestProvider.cs +++ b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Messages/AssociateRequestProvider.cs @@ -3,6 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; + using DotNetOpenAuth.Messaging; + using System.Diagnostics.Contracts; + using DotNetOpenAuth.OpenId.Provider; internal abstract class AssociateRequestProvider : AssociateRequest { /// <summary> diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/ComponentModel/IdentifierConverter.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/ComponentModel/IdentifierConverter.cs index 523bd02..61c0fd8 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/ComponentModel/IdentifierConverter.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/ComponentModel/IdentifierConverter.cs @@ -10,6 +10,7 @@ namespace DotNetOpenAuth.ComponentModel { using System.ComponentModel.Design.Serialization; using System.Reflection; using DotNetOpenAuth.OpenId; + using DotNetOpenAuth.OpenId.RelyingParty; /// <summary> /// A design-time helper to give an OpenID Identifier property an auto-complete functionality diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/DotNetOpenAuth.OpenId.RelyingParty.csproj b/src/DotNetOpenAuth.OpenId.RelyingParty/DotNetOpenAuth.OpenId.RelyingParty.csproj index 324da14..aa6423f 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/DotNetOpenAuth.OpenId.RelyingParty.csproj +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/DotNetOpenAuth.OpenId.RelyingParty.csproj @@ -14,6 +14,7 @@ <RootNamespace>DotNetOpenAuth</RootNamespace> <AssemblyName>DotNetOpenAuth.OpenId.RelyingParty</AssemblyName> </PropertyGroup> + <Import Project="$(ProjectRoot)tools\DotNetOpenAuth.Product.props" /> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> @@ -32,8 +33,6 @@ <Compile Include="OpenId\Extensions\ExtensionsInteropRelyingPartyHelper.cs" /> <Compile Include="OpenId\Extensions\UI\UIUtilities.cs" /> <Compile Include="OpenId\HostMetaDiscoveryService.cs" /> - <Compile Include="OpenId\IdentifierDiscoveryResult.cs" /> - <Compile Include="OpenId\IIdentifierDiscoveryService.cs" /> <Compile Include="OpenId\Interop\AuthenticationResponseShim.cs" /> <Compile Include="OpenId\Interop\ClaimsResponseShim.cs" /> <Compile Include="OpenId\Interop\OpenIdRelyingPartyShim.cs" /> @@ -45,7 +44,6 @@ <Compile Include="OpenId\Mvc\OpenIdAjaxOptions.cs" /> <Compile Include="OpenId\Mvc\OpenIdHelper.cs" /> <Compile Include="OpenId\OpenIdXrdsHelper.cs" /> - <Compile Include="OpenId\ProviderEndpointDescription.cs" /> <Compile Include="OpenId\RelyingParty\CryptoKeyStoreAsRelyingPartyAssociationStore.cs" /> <Compile Include="OpenId\RelyingParty\IRelyingPartyAssociationStore.cs" /> <Compile Include="OpenId\RelyingParty\Associations.cs" /> @@ -53,7 +51,6 @@ <Compile Include="OpenId\RelyingParty\AssociationPreference.cs" /> <Compile Include="OpenId\RelyingParty\AuthenticationRequest.cs" /> <Compile Include="OpenId\RelyingParty\DuplicateRequestedHostsComparer.cs" /> - <Compile Include="OpenId\RelyingParty\IProviderEndpoint.cs" /> <Compile Include="OpenId\RelyingParty\IRelyingPartyBehavior.cs" /> <Compile Include="OpenId\RelyingParty\IAuthenticationRequestContract.cs" /> <Compile Include="OpenId\RelyingParty\NegativeAuthenticationResponse.cs" /> @@ -114,6 +111,10 @@ <Project>{3896A32A-E876-4C23-B9B8-78E17D134CD3}</Project> <Name>DotNetOpenAuth.OpenId</Name> </ProjectReference> + <ProjectReference Include="..\Org.Mentalis.Security.Cryptography\Org.Mentalis.Security.Cryptography.csproj"> + <Project>{26DC877F-5987-48DD-9DDB-E62F2DE0E150}</Project> + <Name>Org.Mentalis.Security.Cryptography</Name> + </ProjectReference> </ItemGroup> <ItemGroup> <Reference Include="System" /> diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Behaviors/AXFetchAsSregTransform.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Behaviors/AXFetchAsSregTransform.cs index 70dbe64..9f583b6 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Behaviors/AXFetchAsSregTransform.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Behaviors/AXFetchAsSregTransform.cs @@ -14,7 +14,6 @@ namespace DotNetOpenAuth.OpenId.Behaviors { using DotNetOpenAuth.OpenId.Extensions; using DotNetOpenAuth.OpenId.Extensions.AttributeExchange; using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration; - using DotNetOpenAuth.OpenId.Provider; using DotNetOpenAuth.OpenId.RelyingParty; /// <summary> diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs index 585dbcd..d963621 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ChannelElements/OpenIdRelyingPartyChannel.cs @@ -38,7 +38,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { /// <param name="securitySettings">The security settings to apply.</param> /// <param name="nonVerifying">A value indicating whether the channel is set up with no functional security binding elements.</param> private OpenIdRelyingPartyChannel(ICryptoKeyStore cryptoKeyStore, INonceStore nonceStore, IMessageFactory messageTypeProvider, RelyingPartySecuritySettings securitySettings, bool nonVerifying) : - this(messageTypeProvider, InitializeBindingElements(cryptoKeyStore, nonceStore, securitySettings, nonVerifying)) { + base(messageTypeProvider, InitializeBindingElements(cryptoKeyStore, nonceStore, securitySettings, nonVerifying)) { Contract.Requires<ArgumentNullException>(messageTypeProvider != null); Contract.Requires<ArgumentNullException>(securitySettings != null); Contract.Requires<ArgumentException>(!nonVerifying || securitySettings is RelyingPartySecuritySettings); @@ -76,12 +76,12 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { Contract.Requires<ArgumentNullException>(securitySettings != null); SigningBindingElement signingElement; - signingElement = nonVerifying ? null : new SigningBindingElement(new CryptoKeyStoreAsRelyingPartyAssociationStore(cryptoKeyStore ?? new MemoryCryptoKeyStore())); + signingElement = nonVerifying ? null : new RelyingPartySigningBindingElement(new CryptoKeyStoreAsRelyingPartyAssociationStore(cryptoKeyStore ?? new MemoryCryptoKeyStore())); var extensionFactory = OpenIdExtensionFactoryAggregator.LoadFromConfiguration(); List<IChannelBindingElement> elements = new List<IChannelBindingElement>(8); - elements.Add(new ExtensionsBindingElement(extensionFactory, securitySettings)); + elements.Add(new ExtensionsBindingElementRelyingParty(extensionFactory, securitySettings)); elements.Add(new RelyingPartySecurityOptions(securitySettings)); elements.Add(new BackwardCompatibilityBindingElement()); ReturnToNonceBindingElement requestNonceElement = null; diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Extensions/ExtensionsInteropRelyingPartyHelper.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Extensions/ExtensionsInteropRelyingPartyHelper.cs index a864da8..b2c9d1e 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Extensions/ExtensionsInteropRelyingPartyHelper.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Extensions/ExtensionsInteropRelyingPartyHelper.cs @@ -19,7 +19,7 @@ namespace DotNetOpenAuth.OpenId.Extensions { /// A set of methods designed to assist in improving interop across different /// OpenID implementations and their extensions. /// </summary> - public static class ExtensionsInteropRelyingPartyHelper : ExtensionsInteropHelper { + public static class ExtensionsInteropRelyingPartyHelper { /// <summary> /// Adds an Attribute Exchange (AX) extension to the authentication request /// that asks for the same attributes as the Simple Registration (sreg) extension diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Interop/OpenIdRelyingPartyShim.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Interop/OpenIdRelyingPartyShim.cs index fc0f32e..ec97162 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Interop/OpenIdRelyingPartyShim.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Interop/OpenIdRelyingPartyShim.cs @@ -96,7 +96,7 @@ namespace DotNetOpenAuth.OpenId.Interop { /// </summary> static OpenIdRelyingPartyShim() { relyingParty = new OpenIdRelyingParty(null); - relyingParty.Behaviors.Add(new Behaviors.AXFetchAsSregTransform()); + relyingParty.Behaviors.Add(new Behaviors.AXFetchAsSregRelyingPartyTransform()); } /// <summary> diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateDiffieHellmanResponse.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateDiffieHellmanResponse.cs index de3dad8..cb44c7c 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateDiffieHellmanResponse.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateDiffieHellmanResponse.cs @@ -10,7 +10,6 @@ namespace DotNetOpenAuth.OpenId.Messages { using System.Security.Cryptography; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.Messaging.Reflection; - using DotNetOpenAuth.OpenId.Provider; using Org.Mentalis.Security.Cryptography; /// <summary> @@ -37,7 +36,7 @@ namespace DotNetOpenAuth.OpenId.Messages { /// <remarks> /// The resulting association is <i>not</i> added to the association store and must be done by the caller. /// </remarks> - protected override Association CreateAssociationAtRelyingParty(AssociateRequest request) { + protected Association CreateAssociationAtRelyingParty(AssociateRequest request) { var diffieHellmanRequest = request as AssociateDiffieHellmanRequest; ErrorUtilities.VerifyArgument(diffieHellmanRequest != null, OpenIdStrings.DiffieHellmanAssociationRequired); diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs index 19d3a94..7524a18 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateRequestRelyingParty.cs @@ -6,7 +6,7 @@ using System.Diagnostics.Contracts; using DotNetOpenAuth.OpenId.RelyingParty; - internal abstract class AssociateRequestRelyingParty : AssociateRequest { + internal static class AssociateRequestRelyingParty { /// <summary> /// Creates an association request message that is appropriate for a given Provider. /// </summary> diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseContract.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseContract.cs index de28a64..b9fa81b 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseContract.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseContract.cs @@ -9,7 +9,16 @@ [ContractClassFor(typeof(AssociateSuccessfulResponseRelyingParty))] internal abstract class AssociateSuccessfulResponseRelyingPartyContract : AssociateSuccessfulResponseRelyingParty { - protected override Association CreateAssociationAtRelyingParty(AssociateRequest request) { + /// <summary> + /// Prevents a default instance of the <see cref="AssociateSuccessfulResponseRelyingPartyContract"/> class from being created. + /// </summary> + /// <param name="version">The version.</param> + /// <param name="request">The request.</param> + private AssociateSuccessfulResponseRelyingPartyContract(Version version, AssociateRequest request) + : base(version, request) { + } + + protected internal override Association CreateAssociationAtRelyingParty(AssociateRequest request) { Contract.Requires<ArgumentNullException>(request != null); throw new NotImplementedException(); } diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseRelyingParty.cs index 7ee3988..3718a68 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseRelyingParty.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateSuccessfulResponseRelyingParty.cs @@ -1,15 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +namespace DotNetOpenAuth.OpenId.Messages { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; -namespace DotNetOpenAuth.OpenId.Messages { internal abstract class AssociateSuccessfulResponseRelyingParty : AssociateSuccessfulResponse { /// <summary> + /// Initializes a new instance of the <see cref="AssociateSuccessfulResponseRelyingParty"/> class. + /// </summary> + /// <param name="version">The version.</param> + /// <param name="request">The request.</param> + internal AssociateSuccessfulResponseRelyingParty(Version version, AssociateRequest request) + : base(version, request) { + } + + /// <summary> /// Called to create the Association based on a request previously given by the Relying Party. /// </summary> /// <param name="request">The prior request for an association.</param> /// <returns>The created association.</returns> - protected abstract Association CreateAssociationAtRelyingParty(AssociateRequest request); + protected internal abstract Association CreateAssociationAtRelyingParty(AssociateRequest request); } } diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateUnencryptedResponseRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateUnencryptedResponseRelyingParty.cs index 23cbd9b..dad47be 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateUnencryptedResponseRelyingParty.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/Messages/AssociateUnencryptedResponseRelyingParty.cs @@ -1,20 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +//----------------------------------------------------------------------- +// <copyright file="AssociateUnencryptedResponseRelyingParty.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- namespace DotNetOpenAuth.OpenId.Messages { + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + internal class AssociateUnencryptedResponseRelyingParty : AssociateUnencryptedResponse { + /// <summary> + /// Initializes a new instance of the <see cref="AssociateUnencryptedResponseRelyingParty"/> class. + /// </summary> + /// <param name="version">The version.</param> + /// <param name="request">The request.</param> + internal AssociateUnencryptedResponseRelyingParty(Version version, AssociateUnencryptedRequest request) + : base(version, request) { + } /// <summary> /// Called to create the Association based on a request previously given by the Relying Party. /// </summary> /// <param name="request">The prior request for an association.</param> /// <returns>The created association.</returns> - protected override Association CreateAssociationAtRelyingParty(AssociateRequest request) { + protected Association CreateAssociationAtRelyingParty(AssociateRequest request) { Association association = HmacShaAssociation.Create(Protocol, this.AssociationType, this.AssociationHandle, this.MacKey, TimeSpan.FromSeconds(this.ExpiresIn)); return association; } - } } diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/AssociationManager.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/AssociationManager.cs index 9a43506..b0c543c 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/AssociationManager.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/AssociationManager.cs @@ -157,7 +157,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { } try { - var associateRequest = AssociateRequest.Create(this.securitySettings, provider); + var associateRequest = AssociateRequestRelyingParty.Create(this.securitySettings, provider); const int RenegotiateRetries = 1; return this.CreateNewAssociation(provider, associateRequest, RenegotiateRetries); @@ -193,10 +193,10 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { try { var associateResponse = this.channel.Request(associateRequest); - var associateSuccessfulResponse = associateResponse as AssociateSuccessfulResponse; + var associateSuccessfulResponse = associateResponse as AssociateSuccessfulResponseRelyingParty; var associateUnsuccessfulResponse = associateResponse as AssociateUnsuccessfulResponse; if (associateSuccessfulResponse != null) { - Association association = associateSuccessfulResponse.CreateAssociation(associateRequest, null, null); + Association association = associateSuccessfulResponse.CreateAssociationAtRelyingParty(associateRequest); this.associationStore.StoreAssociation(provider.Uri, association); return association; } else if (associateUnsuccessfulResponse != null) { @@ -223,7 +223,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { associateUnsuccessfulResponse.AssociationType, associateUnsuccessfulResponse.SessionType); - associateRequest = AssociateRequest.Create(this.securitySettings, provider, associateUnsuccessfulResponse.AssociationType, associateUnsuccessfulResponse.SessionType); + associateRequest = AssociateRequestRelyingParty.Create(this.securitySettings, provider, associateUnsuccessfulResponse.AssociationType, associateUnsuccessfulResponse.SessionType); return this.CreateNewAssociation(provider, associateRequest, retriesRemaining - 1); } else { throw new ProtocolException(MessagingStrings.UnexpectedMessageReceivedOfMany); diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs index 290d29e..d39d2ca 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs +++ b/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/OpenIdRelyingParty.cs @@ -141,7 +141,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { cryptoKeyStore = new MemoryCryptoKeyStore(); } - this.channel = new OpenIdChannel(cryptoKeyStore, nonceStore, this.SecuritySettings); + this.channel = new OpenIdRelyingPartyChannel(cryptoKeyStore, nonceStore, this.SecuritySettings); this.AssociationManager = new AssociationManager(this.Channel, new CryptoKeyStoreAsRelyingPartyAssociationStore(cryptoKeyStore), this.SecuritySettings); Reporting.RecordFeatureAndDependencyUse(this, cryptoKeyStore, nonceStore); @@ -665,7 +665,7 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { internal static OpenIdRelyingParty CreateNonVerifying() { OpenIdRelyingParty rp = new OpenIdRelyingParty(); try { - rp.Channel = OpenIdChannel.CreateNonVerifyingChannel(); + rp.Channel = OpenIdRelyingPartyChannel.CreateNonVerifyingChannel(); return rp; } catch { rp.Dispose(); diff --git a/src/DotNetOpenAuth.OpenId/DotNetOpenAuth.OpenId.csproj b/src/DotNetOpenAuth.OpenId/DotNetOpenAuth.OpenId.csproj index eeffeee..c7c5e77 100644 --- a/src/DotNetOpenAuth.OpenId/DotNetOpenAuth.OpenId.csproj +++ b/src/DotNetOpenAuth.OpenId/DotNetOpenAuth.OpenId.csproj @@ -83,6 +83,9 @@ <Compile Include="OpenId\Identifier.cs" /> <Compile Include="OpenId\IdentifierContract.cs" /> <Compile Include="OpenId\Extensions\ExtensionsInteropHelper.cs" /> + <Compile Include="OpenId\IdentifierDiscoveryResult.cs" /> + <Compile Include="OpenId\IIdentifierDiscoveryService.cs" /> + <Compile Include="OpenId\IProviderEndpoint.cs" /> <Compile Include="OpenId\Messages\CheckAuthenticationRequest.cs" /> <Compile Include="OpenId\Messages\CheckAuthenticationResponse.cs" /> <Compile Include="OpenId\Messages\CheckIdRequest.cs" /> @@ -97,6 +100,7 @@ <Compile Include="OpenId\NoDiscoveryIdentifier.cs" /> <Compile Include="OpenId\OpenIdUtilities.cs" /> <Compile Include="OpenId\OpenIdXrdsHelper.cs" /> + <Compile Include="OpenId\ProviderEndpointDescription.cs" /> <Compile Include="OpenId\Realm.cs" /> <Compile Include="OpenId\RelyingPartyDescription.cs" /> <Compile Include="OpenId\DiffieHellmanUtilities.cs" /> diff --git a/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdChannel.cs b/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdChannel.cs index 2f1c7da..cc49a95 100644 --- a/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdChannel.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/ChannelElements/OpenIdChannel.cs @@ -46,7 +46,7 @@ namespace DotNetOpenAuth.OpenId.ChannelElements { /// <param name="messageTypeProvider">A class prepared to analyze incoming messages and indicate what concrete /// message types can deserialize from it.</param> /// <param name="bindingElements">The binding elements to use in sending and receiving messages.</param> - private OpenIdChannel(IMessageFactory messageTypeProvider, IChannelBindingElement[] bindingElements) + protected OpenIdChannel(IMessageFactory messageTypeProvider, IChannelBindingElement[] bindingElements) : base(messageTypeProvider, bindingElements) { Contract.Requires<ArgumentNullException>(messageTypeProvider != null); diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/IIdentifierDiscoveryService.cs b/src/DotNetOpenAuth.OpenId/OpenId/IIdentifierDiscoveryService.cs index fcea327..fcea327 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/IIdentifierDiscoveryService.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/IIdentifierDiscoveryService.cs diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/IProviderEndpoint.cs b/src/DotNetOpenAuth.OpenId/OpenId/IProviderEndpoint.cs index 5d8918d..5d8918d 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/RelyingParty/IProviderEndpoint.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/IProviderEndpoint.cs diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/IdentifierDiscoveryResult.cs b/src/DotNetOpenAuth.OpenId/OpenId/IdentifierDiscoveryResult.cs index c851f24..c851f24 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/IdentifierDiscoveryResult.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/IdentifierDiscoveryResult.cs diff --git a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ProviderEndpointDescription.cs b/src/DotNetOpenAuth.OpenId/OpenId/ProviderEndpointDescription.cs index 6514ffd..6514ffd 100644 --- a/src/DotNetOpenAuth.OpenId.RelyingParty/OpenId/ProviderEndpointDescription.cs +++ b/src/DotNetOpenAuth.OpenId/OpenId/ProviderEndpointDescription.cs diff --git a/src/DotNetOpenAuth.OpenId/Properties/AssemblyInfo.cs b/src/DotNetOpenAuth.OpenId/Properties/AssemblyInfo.cs index a043ec6..af88627 100644 --- a/src/DotNetOpenAuth.OpenId/Properties/AssemblyInfo.cs +++ b/src/DotNetOpenAuth.OpenId/Properties/AssemblyInfo.cs @@ -18,8 +18,6 @@ using System.Security.Permissions; using System.Web.UI; [assembly: TagPrefix("DotNetOpenAuth.OpenId", "openid")] -[assembly: TagPrefix("DotNetOpenAuth.OpenId.Provider", "op")] -[assembly: TagPrefix("DotNetOpenAuth.OpenId.RelyingParty", "rp")] // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/DotNetOpenAuth.sln b/src/DotNetOpenAuth.sln index d526431..f53ab4a 100644 --- a/src/DotNetOpenAuth.sln +++ b/src/DotNetOpenAuth.sln @@ -356,8 +356,8 @@ Global {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.Debug|Any CPU.Build.0 = Debug|Any CPU {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.Release|Any CPU.ActiveCfg = Release|Any CPU {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.Release|Any CPU.Build.0 = Release|Any CPU - {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.ReleaseNoUI|Any CPU.ActiveCfg = ReleaseNoUI|Any CPU - {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.ReleaseNoUI|Any CPU.Build.0 = ReleaseNoUI|Any CPU + {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.ReleaseNoUI|Any CPU.ActiveCfg = Release|Any CPU + {408D10B8-34BA-4CBD-B7AA-FEB1907ABA4C}.ReleaseNoUI|Any CPU.Build.0 = Release|Any CPU {56459A6C-6BA2-4BAC-A9C0-27E3BD961FA6}.CodeAnalysis|Any CPU.ActiveCfg = CodeAnalysis|Any CPU {56459A6C-6BA2-4BAC-A9C0-27E3BD961FA6}.CodeAnalysis|Any CPU.Build.0 = CodeAnalysis|Any CPU {56459A6C-6BA2-4BAC-A9C0-27E3BD961FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |