mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
PHRAS-3765_oauth-parms-in-session (#4153)
PHRAS-3765: fetch parms from session PHRAS-3765 : fix : pass custom parameters as argument (don't try to hack request)
This commit is contained in:
@@ -197,7 +197,17 @@ class OAuth2Controller extends Controller
|
||||
{
|
||||
$context = new Context(Context::CONTEXT_OAUTH2_NATIVE);
|
||||
$provider = $this->findProvider($providerId);
|
||||
$params = $this->oAuth2Adapter->getAuthorizationRequestParameters($request);
|
||||
|
||||
/*
|
||||
* some api client (parade) did want to pass parameters into oauth2 callback url
|
||||
* but we prevent this for openid
|
||||
* The parameters can be passed in session, we restore them
|
||||
*/
|
||||
$customParms = $this->getSession()->get($provider->getId() . '.parms', []);
|
||||
if(!is_array($customParms)) {
|
||||
$customParms = [];
|
||||
}
|
||||
$params = $this->oAuth2Adapter->getAuthorizationRequestParameters($request, $customParms);
|
||||
|
||||
// triggers what's necessary
|
||||
try {
|
||||
|
Reference in New Issue
Block a user