diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-10 10:42:01 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2012-03-10 10:42:01 -0800 |
commit | 5bd70111d5740844656aaed12206c9f28dd25923 (patch) | |
tree | 7f25810c5e6029dfdc0b491c58393fc8f76fcaf1 /src/DotNetOpenAuth.OAuth2/OAuth2 | |
parent | 6e68095c020f88f6c61b3a76f1fa885ead1e7f15 (diff) | |
download | DotNetOpenAuth-5bd70111d5740844656aaed12206c9f28dd25923.zip DotNetOpenAuth-5bd70111d5740844656aaed12206c9f28dd25923.tar.gz DotNetOpenAuth-5bd70111d5740844656aaed12206c9f28dd25923.tar.bz2 |
FxCop fixes and suppressions.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2/OAuth2')
4 files changed, 5 insertions, 3 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs index 0e6aa47..6717717 100644 --- a/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs +++ b/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2AuthorizationServerChannel.cs @@ -56,7 +56,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements { /// </remarks> protected override OutgoingWebResponse PrepareDirectResponse(IProtocolMessage response) { var webResponse = new OutgoingWebResponse(); - this.ApplyMessageTemplate(response, webResponse); + ApplyMessageTemplate(response, webResponse); string json = this.SerializeAsJson(response); webResponse.SetResponse(json, new ContentType(JsonEncoded)); return webResponse; diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs index 052da8e..947c044 100644 --- a/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs +++ b/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/OAuth2ResourceServerChannel.cs @@ -106,7 +106,7 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements { ErrorUtilities.VerifyInternal(unauthorizedResponse != null, "Only unauthorized responses are expected."); // First initialize based on the specifics within the message. - this.ApplyMessageTemplate(response, webResponse); + ApplyMessageTemplate(response, webResponse); if (!(response is IHttpDirectResponse)) { webResponse.Status = HttpStatusCode.Unauthorized; } diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs index 6cf8919..dbfe46b 100644 --- a/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs +++ b/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/AccessProtectedResourceRequest.cs @@ -62,7 +62,7 @@ namespace DotNetOpenAuth.OAuth2.Messages { /// Always "bearer". /// </value> [MessagePart("token_type", IsRequired = true)] - internal string TokenType { + internal static string TokenType { get { return Protocol.AccessTokenTypes.Bearer; } } diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs index 1d9618b..ef0010e 100644 --- a/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs +++ b/src/DotNetOpenAuth.OAuth2/OAuth2/Messages/EndUserAuthorizationSuccessResponseBase.cs @@ -7,6 +7,7 @@ namespace DotNetOpenAuth.OAuth2.Messages { using System; using System.Collections.Generic; + using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Security.Cryptography; @@ -59,6 +60,7 @@ namespace DotNetOpenAuth.OAuth2.Messages { /// Gets or sets the scope of the <see cref="AccessToken"/> if one is given; otherwise the scope of the authorization code. /// </summary> /// <value>The scope.</value> + [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "By design")] public ICollection<string> Scope { get; protected set; } /// <summary> |