Ensure state is in access denied redirect. Fixes #597

This commit is contained in:
Alex Bilbie 2016-06-28 09:03:01 +01:00
parent 66de05a395
commit 5ee1583c5b
2 changed files with 12 additions and 2 deletions

View File

@ -335,7 +335,12 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
// The user denied the client, redirect them back with an error
throw OAuthServerException::accessDenied(
'The user denied the request',
$finalRedirectUri
$this->makeRedirectUri(
$finalRedirectUri,
[
'state' => $authorizationRequest->getState(),
]
)
);
}
}

View File

@ -207,7 +207,12 @@ class ImplicitGrant extends AbstractAuthorizeGrant
// The user denied the client, redirect them back with an error
throw OAuthServerException::accessDenied(
'The user denied the request',
$finalRedirectUri
$this->makeRedirectUri(
$finalRedirectUri,
[
'state' => $authorizationRequest->getState(),
]
)
);
}
}