summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-02-20 22:18:31 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-02-20 22:18:31 -0800
commit335402d6dda7a96acab14e7263ef16e06e637d12 (patch)
tree1f108e239c21dcdc99469d113224afde4ae3cade /src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs
parent234cf20e86b0ed1d65bca4a61eabb3277e8562c5 (diff)
downloadDotNetOpenAuth-335402d6dda7a96acab14e7263ef16e06e637d12.zip
DotNetOpenAuth-335402d6dda7a96acab14e7263ef16e06e637d12.tar.gz
DotNetOpenAuth-335402d6dda7a96acab14e7263ef16e06e637d12.tar.bz2
Added scaffolding for OAuth2 unit tests and added the first test for client authorization.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs
index 6199178..111c007 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/ChannelElements/AuthorizationCode.cs
@@ -61,8 +61,11 @@ namespace DotNetOpenAuth.OAuth2.ChannelElements {
Requires.NotNull(authorizationServer, "authorizationServer");
Contract.Ensures(Contract.Result<IDataBagFormatter<AuthorizationCode>>() != null);
+ var cryptoStore = authorizationServer.CryptoKeyStore;
+ ErrorUtilities.VerifyHost(cryptoStore != null, OAuthStrings.ResultShouldNotBeNull, authorizationServer.GetType(), "CryptoKeyStore");
+
return new UriStyleMessageFormatter<AuthorizationCode>(
- authorizationServer.CryptoKeyStore,
+ cryptoStore,
AuthorizationCodeKeyBucket,
signed: true,
encrypted: true,