forked from LiveCarta/PayPal-PHP-SDK
Update OpenID Connect URLs to match docs
- URLs were updated. See https://developer.paypal.com/docs/api/auth-headers/#obtain-users-consent
This commit is contained in:
@@ -49,7 +49,7 @@ class OpenIdSessionTest extends \PHPUnit_Framework_TestCase
|
||||
$redirectUri = 'https://devtools-paypal.com/';
|
||||
$scope = array('this', 'that', 'and more');
|
||||
|
||||
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
|
||||
$expectedBaseUrl = "https://www.paypal.com/signin/authorize";
|
||||
|
||||
$this->assertEquals($expectedBaseUrl . "?client_id=$clientId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
|
||||
OpenIdSession::getAuthorizationUrl($redirectUri, $scope, $clientId), "Failed case - custom scope");
|
||||
@@ -73,7 +73,7 @@ class OpenIdSessionTest extends \PHPUnit_Framework_TestCase
|
||||
$redirectUri = 'http://mywebsite.com';
|
||||
$scope = array('this', 'that', 'and more');
|
||||
|
||||
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize";
|
||||
$expectedBaseUrl = "https://www.paypal.com/signin/authorize";
|
||||
|
||||
$this->assertEquals($expectedBaseUrl . "?client_id=DummyId&response_type=code&scope=this+that+and+more+openid&redirect_uri=" . urlencode($redirectUri),
|
||||
OpenIdSession::getAuthorizationUrl($redirectUri, $scope, "DummyId", null, null, $this->context), "Failed case - custom config");
|
||||
@@ -88,7 +88,7 @@ class OpenIdSessionTest extends \PHPUnit_Framework_TestCase
|
||||
$redirectUri = 'http://mywebsite.com';
|
||||
$idToken = 'abc';
|
||||
|
||||
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/endsession";
|
||||
$expectedBaseUrl = "https://www.paypal.com/signin/endsession";
|
||||
|
||||
$this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true",
|
||||
OpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
|
||||
|
||||
Reference in New Issue
Block a user