diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-15 22:06:56 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-07-15 22:06:56 -0700 |
commit | c7596ce730435697d925d9a99dfe31179aac3b5a (patch) | |
tree | 3fc61db7312b425638bdd25912c39741cf5067dc /src | |
parent | 6dac00d4e023b664b8603a6497e8cef4e70068ca (diff) | |
download | DotNetOpenAuth-c7596ce730435697d925d9a99dfe31179aac3b5a.zip DotNetOpenAuth-c7596ce730435697d925d9a99dfe31179aac3b5a.tar.gz DotNetOpenAuth-c7596ce730435697d925d9a99dfe31179aac3b5a.tar.bz2 |
Fixed some more OAuth 2 sample stuff.
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/OAuth2/ResourceServer.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/OAuth2/ResourceServer.cs b/src/DotNetOpenAuth/OAuth2/ResourceServer.cs index 25af340..f013a5e 100644 --- a/src/DotNetOpenAuth/OAuth2/ResourceServer.cs +++ b/src/DotNetOpenAuth/OAuth2/ResourceServer.cs @@ -89,7 +89,11 @@ namespace DotNetOpenAuth.OAuth2 { throw ErrorUtilities.ThrowProtocol("Bad access token"); } else { - throw ErrorUtilities.ThrowProtocol("Missing access token."); + var response = new UnauthorizedResponse(new ProtocolException("Missing access token")); + + username = null; + scope = null; + return this.Channel.PrepareResponse(response); } } catch (ProtocolException ex) { var response = request != null ? new UnauthorizedResponse(request, ex) : new UnauthorizedResponse(ex); |