forked from LiveCarta/PayPal-PHP-SDK
Revert OpenID Connect endsession change
This commit is contained in:
@@ -53,7 +53,7 @@ class OpenIdSession
|
|||||||
if ($state) {
|
if ($state) {
|
||||||
$params['state'] = $state;
|
$params['state'] = $state;
|
||||||
}
|
}
|
||||||
return sprintf("%s/authorize?%s", self::getBaseUrl($config), http_build_query($params));
|
return sprintf("%s/signin/authorize?%s", self::getBaseUrl($config), http_build_query($params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ class OpenIdSession
|
|||||||
'redirect_uri' => $redirectUri,
|
'redirect_uri' => $redirectUri,
|
||||||
'logout' => 'true'
|
'logout' => 'true'
|
||||||
);
|
);
|
||||||
return sprintf("%s/endsession?%s", self::getBaseUrl($config), http_build_query($params));
|
return sprintf("%s/webapps/auth/protocol/openidconnect/v1/endsession?%s", self::getBaseUrl($config), http_build_query($params));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ class PayPalConstants
|
|||||||
const APPROVAL_URL = 'approval_url';
|
const APPROVAL_URL = 'approval_url';
|
||||||
|
|
||||||
const REST_SANDBOX_ENDPOINT = "https://api.sandbox.paypal.com/";
|
const REST_SANDBOX_ENDPOINT = "https://api.sandbox.paypal.com/";
|
||||||
const OPENID_REDIRECT_SANDBOX_URL = "https://www.sandbox.paypal.com/signin";
|
const OPENID_REDIRECT_SANDBOX_URL = "https://www.sandbox.paypal.com";
|
||||||
|
|
||||||
const REST_LIVE_ENDPOINT = "https://api.paypal.com/";
|
const REST_LIVE_ENDPOINT = "https://api.paypal.com/";
|
||||||
const OPENID_REDIRECT_LIVE_URL = "https://www.paypal.com/signin";
|
const OPENID_REDIRECT_LIVE_URL = "https://www.paypal.com";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class OpenIdSessionTest extends \PHPUnit_Framework_TestCase
|
|||||||
$redirectUri = 'http://mywebsite.com';
|
$redirectUri = 'http://mywebsite.com';
|
||||||
$idToken = 'abc';
|
$idToken = 'abc';
|
||||||
|
|
||||||
$expectedBaseUrl = "https://www.paypal.com/signin/endsession";
|
$expectedBaseUrl = "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/endsession";
|
||||||
|
|
||||||
$this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true",
|
$this->assertEquals($expectedBaseUrl . "?id_token=$idToken&redirect_uri=" . urlencode($redirectUri) . "&logout=true",
|
||||||
OpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
|
OpenIdSession::getLogoutUrl($redirectUri, $idToken, $this->context), "Failed case - custom config");
|
||||||
|
|||||||
Reference in New Issue
Block a user