Commit 1ab09920 authored by efalcy's avatar efalcy

dev#106075 fix tests

parent 78c01ebf
......@@ -102,7 +102,7 @@ abstract class Class_WebService_IdentityProvider {
/** @return string */
public function getLoginSuccessRedirectUrl() {
return '';
return $this->getSession()->success_redirect_url;
}
......
......@@ -34,9 +34,7 @@ class Class_WebService_OpenId extends Class_WebService_IdentityProvider {
$_userinfo_url = '',
$_revocation_url = '',
$_jwks_uri = '',
$_logout_url,
$_redirect_url ='';
$_logout_url;
public static function isLogged() {
......@@ -238,15 +236,9 @@ class Class_WebService_OpenId extends Class_WebService_IdentityProvider {
public function getState() {
if (isset($this->getSession()->state)
&& ($state = $this->getSession()->state))
{
var_dump($state);
return $state;
}
return $this->getSession()->state = $this->_redirect_url
? base64_encode($this->_redirect_url)
: $this->_getRandomToken();
return $this->_getRandomToken();
}
......
......@@ -489,6 +489,8 @@ class IdentityProviderAuthenticationConnectedUser
public function setUp() {
parent::setUp();
$session = Class_WebService_OpenId::getSession();
$session->success_redirect_url = 'http://bokeh.org/mycurrenturl';
$session->state = $this->_state;
$session->nonce = $this->_nonce;
$session->userinfo = (object)['sub' => '9763', 'name' => 'Albator'];
......@@ -558,6 +560,8 @@ class IdentityProviderAuthenticationCallbackAuthentication
public function setUp() {
parent::setup();
$session = Class_WebService_OpenId::getSession();
$session->success_redirect_url = 'http://bokeh.org/mycurrenturl';
$session->state = $this->_state;
$session->nonce = $this->_nonce;
$session->access_token = 1111;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment