summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.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/OAuthUtilities.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/OAuthUtilities.cs')
-rw-r--r--src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs b/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs
index 245779a..68ccc1d 100644
--- a/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs
+++ b/src/DotNetOpenAuth.OAuth2/OAuth2/OAuthUtilities.cs
@@ -141,7 +141,9 @@ namespace DotNetOpenAuth.OAuth2 {
Contract.Ensures(Contract.Result<IClientDescription>() != null);
try {
- return authorizationServer.GetClient(clientIdentifier);
+ var result = authorizationServer.GetClient(clientIdentifier);
+ ErrorUtilities.VerifyHost(result != null, OAuthStrings.ResultShouldNotBeNull, authorizationServer.GetType().FullName, "GetClient(string)");
+ return result;
} catch (KeyNotFoundException ex) {
throw ErrorUtilities.Wrap(ex, OAuthStrings.ClientOrTokenSecretNotFound);
} catch (ArgumentException ex) {