diff options
author | David Christiansen <DavidChristiansen@users.noreply.github.com> | 2014-12-08 13:32:52 +0000 |
---|---|---|
committer | David Christiansen <DavidChristiansen@users.noreply.github.com> | 2014-12-08 13:32:52 +0000 |
commit | 92ef68e33b715ecdd1d42ee33ce56e9ea295f4f7 (patch) | |
tree | 63d3b9ad2ea6e16dc0591bb32b26b3d8d5f07a74 /src | |
parent | f71e21aa7c7ed130130aa94174b77d576897f650 (diff) | |
parent | afc9f783d09d63a03ef34242c4d6a6ca05cc427a (diff) | |
download | DotNetOpenAuth.Samples-92ef68e33b715ecdd1d42ee33ce56e9ea295f4f7.zip DotNetOpenAuth.Samples-92ef68e33b715ecdd1d42ee33ce56e9ea295f4f7.tar.gz DotNetOpenAuth.Samples-92ef68e33b715ecdd1d42ee33ce56e9ea295f4f7.tar.bz2 |
Merge pull request #15 from trpalmer/master
Fix approval denied return so it's valid
Diffstat (limited to 'src')
-rw-r--r-- | src/OAuth/OAuthAuthorizationServer/Controllers/OAuthController.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/OAuth/OAuthAuthorizationServer/Controllers/OAuthController.cs b/src/OAuth/OAuthAuthorizationServer/Controllers/OAuthController.cs index 4260b48..c9ab6cb 100644 --- a/src/OAuth/OAuthAuthorizationServer/Controllers/OAuthController.cs +++ b/src/OAuth/OAuthAuthorizationServer/Controllers/OAuthController.cs @@ -84,6 +84,9 @@ response = this.authorizationServer.PrepareApproveAuthorizationRequest(pendingRequest, User.Identity.Name); } else { response = this.authorizationServer.PrepareRejectAuthorizationRequest(pendingRequest); + var errorResponse = response as EndUserAuthorizationFailedResponse; + errorResponse.Error = "accesss_denied"; // see http://tools.ietf.org/id/draft-ietf-oauth-v2-31.html#rfc.section.4.1.2.1 for valid values + errorResponse.Description = "The resource owner or authorization server denied the request"; } return this.authorizationServer.Channel.PrepareResponse(response).AsActionResult(); |