diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:20:46 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-12-26 20:20:46 -0800 |
commit | 3475fab579db0f6a1454ebc83d2e8a9c271e4c18 (patch) | |
tree | bc1cc264acba9edc486eefbbfbb5fd4822111fb1 /src/DotNetOpenAuth.OAuth2.ClientAuthorization | |
parent | 002ce0e39af3b684ce6060dce60805e3333420fa (diff) | |
download | DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.zip DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.tar.gz DotNetOpenAuth-3475fab579db0f6a1454ebc83d2e8a9c271e4c18.tar.bz2 |
Removes more remnants of Code Contracts.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2.ClientAuthorization')
8 files changed, 0 insertions, 77 deletions
diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IClientDescription.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IClientDescription.cs index 4ea8f21..fe05f25 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IClientDescription.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/IClientDescription.cs @@ -7,14 +7,12 @@ namespace DotNetOpenAuth.OAuth2 { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using DotNetOpenAuth.Messaging; using Validation; /// <summary> /// A description of a client from an Authorization Server's point of view. /// </summary> - [ContractClass(typeof(IClientDescriptionContract))] public interface IClientDescription { /// <summary> /// Gets the callback to use when an individual authorization request @@ -70,70 +68,4 @@ namespace DotNetOpenAuth.OAuth2 { /// </remarks> bool IsValidClientSecret(string secret); } - - /// <summary> - /// Contract class for the <see cref="IClientDescription"/> interface. - /// </summary> - [ContractClassFor(typeof(IClientDescription))] - internal abstract class IClientDescriptionContract : IClientDescription { - #region IClientDescription Members - - /// <summary> - /// Gets the type of the client. - /// </summary> - ClientType IClientDescription.ClientType { - get { throw new NotImplementedException(); } - } - - /// <summary> - /// Gets the callback to use when an individual authorization request - /// does not include an explicit callback URI. - /// </summary> - /// <value> - /// An absolute URL; or <c>null</c> if none is registered. - /// </value> - Uri IClientDescription.DefaultCallback { - get { - Contract.Ensures(Contract.Result<Uri>() == null || Contract.Result<Uri>().IsAbsoluteUri); - throw new NotImplementedException(); - } - } - - /// <summary> - /// Gets a value indicating whether a non-empty secret is registered for this client. - /// </summary> - bool IClientDescription.HasNonEmptySecret { - get { throw new NotImplementedException(); } - } - - /// <summary> - /// Determines whether a callback URI included in a client's authorization request - /// is among those allowed callbacks for the registered client. - /// </summary> - /// <param name="callback">The requested callback URI.</param> - /// <returns> - /// <c>true</c> if the callback is allowed; otherwise, <c>false</c>. - /// </returns> - bool IClientDescription.IsCallbackAllowed(Uri callback) { - Requires.NotNull(callback, "callback"); - Requires.That(callback.IsAbsoluteUri, "callback", "Absolute URI required."); - throw new NotImplementedException(); - } - - /// <summary> - /// Checks whether the specified client secret is correct. - /// </summary> - /// <param name="secret">The secret obtained from the client.</param> - /// <returns><c>true</c> if the secret matches the one in the authorization server's record for the client; <c>false</c> otherwise.</returns> - /// <remarks> - /// All string equality checks, whether checking secrets or their hashes, - /// should be done using <see cref="MessagingUtilities.EqualsConstantTime"/> to mitigate timing attacks. - /// </remarks> - bool IClientDescription.IsValidClientSecret(string secret) { - Requires.NotNullOrEmpty(secret, "secret"); - throw new NotImplementedException(); - } - - #endregion - } } diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/AccessTokenAuthorizationCodeRequest.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/AccessTokenAuthorizationCodeRequest.cs index b8c9ede..bf06627 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/AccessTokenAuthorizationCodeRequest.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/AccessTokenAuthorizationCodeRequest.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Linq; using System.Text; diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationFailedResponse.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationFailedResponse.cs index 79a06d3..cb1c5d4 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationFailedResponse.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationFailedResponse.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Linq; using System.Runtime.Remoting.Messaging; using System.Text; diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationRequest.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationRequest.cs index 0048ad9..9da2c03 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationRequest.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationRequest.cs @@ -8,7 +8,6 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - using System.Diagnostics.Contracts; using DotNetOpenAuth.Configuration; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OAuth2.ChannelElements; diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAccessTokenResponse.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAccessTokenResponse.cs index 11d2443..a776459 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAccessTokenResponse.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAccessTokenResponse.cs @@ -7,7 +7,6 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; - using System.Diagnostics.Contracts; using System.Linq; using System.Text; diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAuthCodeResponse.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAuthCodeResponse.cs index f49cb9f..9f7c4b1 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAuthCodeResponse.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessAuthCodeResponse.cs @@ -6,7 +6,6 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; - using System.Diagnostics.Contracts; using DotNetOpenAuth.Messaging; using DotNetOpenAuth.OAuth2.ChannelElements; diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs index f7f4b7a..bf385f9 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs @@ -8,7 +8,6 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - using System.Diagnostics.Contracts; using System.Security.Cryptography; using DotNetOpenAuth.Messaging; diff --git a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/Properties/AssemblyInfo.cs b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/Properties/AssemblyInfo.cs index 3d9e231..f4a2303 100644 --- a/src/DotNetOpenAuth.OAuth2.ClientAuthorization/Properties/AssemblyInfo.cs +++ b/src/DotNetOpenAuth.OAuth2.ClientAuthorization/Properties/AssemblyInfo.cs @@ -7,7 +7,6 @@ // We DON'T put an AssemblyVersionAttribute in here because it is generated in the build. using System; -using System.Diagnostics.Contracts; using System.Net; using System.Reflection; using System.Resources; @@ -31,8 +30,6 @@ using System.Web.UI; // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7d73990c-47c0-4256-9f20-a893add9e289")] -[assembly: ContractVerification(true)] - #if StrongNameSigned // See comment at top of this file. We need this so that strong-naming doesn't // keep this assembly from being useful to shared host (medium trust) web sites. |