diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:22:14 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:22:14 -0800 |
commit | 391397a341282d0c088bc9e9901ced9b19a62e5a (patch) | |
tree | bc1cc264acba9edc486eefbbfbb5fd4822111fb1 /src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs | |
parent | 8f48e3f1daedb77e451f9fe8ac497741c6bb06f9 (diff) | |
parent | 3475fab579db0f6a1454ebc83d2e8a9c271e4c18 (diff) | |
download | DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.zip DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.tar.gz DotNetOpenAuth-391397a341282d0c088bc9e9901ced9b19a62e5a.tar.bz2 |
Merge branch 'retargeting-contracts'
Diffstat (limited to 'src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs')
-rw-r--r-- | src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs index 930abcd..e0f84b9 100644 --- a/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs +++ b/src/DotNetOpenAuth.OpenId.Provider/OpenId/Provider/IProviderAssociationStore.cs @@ -7,10 +7,10 @@ namespace DotNetOpenAuth.OpenId.Provider { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Linq; using System.Text; using DotNetOpenAuth.Messaging; + using Validation; /// <summary> /// Provides association serialization and deserialization. @@ -24,7 +24,6 @@ namespace DotNetOpenAuth.OpenId.Provider { /// to avoid disclosing the secret to anyone who sees the association handle, which itself isn't considered to /// be confidential. /// </remarks> - [ContractClass(typeof(IProviderAssociationStoreContract))] internal interface IProviderAssociationStore { /// <summary> /// Stores an association and returns a handle for it. @@ -49,42 +48,4 @@ namespace DotNetOpenAuth.OpenId.Provider { /// <exception cref="ProtocolException">Thrown if the association is not of the expected type.</exception> Association Deserialize(IProtocolMessage containingMessage, bool privateAssociation, string handle); } - - /// <summary> - /// Code contract for the <see cref="IProviderAssociationStore"/> interface. - /// </summary> - [ContractClassFor(typeof(IProviderAssociationStore))] - internal abstract class IProviderAssociationStoreContract : IProviderAssociationStore { - /// <summary> - /// Stores an association and returns a handle for it. - /// </summary> - /// <param name="secret">The association secret.</param> - /// <param name="expiresUtc">The expires UTC.</param> - /// <param name="privateAssociation">A value indicating whether this is a private association.</param> - /// <returns> - /// The association handle that represents this association. - /// </returns> - string IProviderAssociationStore.Serialize(byte[] secret, DateTime expiresUtc, bool privateAssociation) { - Requires.NotNull(secret, "secret"); - Requires.True(expiresUtc.Kind == DateTimeKind.Utc, "expiresUtc"); - Contract.Ensures(!string.IsNullOrEmpty(Contract.Result<string>())); - throw new NotImplementedException(); - } - - /// <summary> - /// Retrieves an association given an association handle. - /// </summary> - /// <param name="containingMessage">The OpenID message that referenced this association handle.</param> - /// <param name="privateAssociation">A value indicating whether a private association is expected.</param> - /// <param name="handle">The association handle.</param> - /// <returns> - /// An association instance, or <c>null</c> if the association has expired or the signature is incorrect (which may be because the OP's symmetric key has changed). - /// </returns> - /// <exception cref="ProtocolException">Thrown if the association is not of the expected type.</exception> - Association IProviderAssociationStore.Deserialize(IProtocolMessage containingMessage, bool privateAssociation, string handle) { - Requires.NotNull(containingMessage, "containingMessage"); - Requires.NotNullOrEmpty(handle, "handle"); - throw new NotImplementedException(); - } - } } |