-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ACCOUNT-2797] refactor: remove guzzle dependency #468
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # .github/workflows/accounts-qc-php.yml # .zip-contents # Makefile # composer.json # composer.lock # config.local.php # config.preprod.php # config/admin/services.yml # config/common.yml # config/front/services.yml # ps_accounts.php
# Conflicts: # _dev/package.json # config.xml # ps_accounts.php
$oauth2Client = $this->getOAuth2Client(); | ||
|
||
$logoutUrl = $oauth2Client->getLogoutUri( | ||
$oauth2Client->getPostLogoutRedirectUri(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decide if we also allow setting alternative postLoginUri with login flow
src/Http/Client/Curl/Client.php
Outdated
/** | ||
* @var string | ||
*/ | ||
protected $userAgent = 'ps_accounts/' . \Ps_accounts::VERSION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header string to be decided with the team
|
||
return $this->getSafeResponse($ch); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put ?
} else { | ||
$decodedBody = json_decode($body, true); | ||
|
||
return is_array($decodedBody) ? $decodedBody : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We expect only json object / list
src/OAuth2/ApiClient.php
Outdated
* | ||
* @throws OAuth2Exception | ||
*/ | ||
public function getAuthorizationUri( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow to specify another redirect uri here ?
@@ -0,0 +1,33 @@ | |||
<?php | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
|
To go a step further reducing friction with the PrestaShop module's ecosystem, reducing module weight.
As a module we just need to do a few things, not to embed huge libraries so let's get straight to the point and isolate a much a possible from other modules to avoid collisions, also stay lighter.
Still a POC, but fully functional.
Benefits: