src/Authentication/Cookies.php
function executeRedirect($source_url = null, $return = null) {
    	if (!$this->secret) {
	    	if(count($this->cookies)) {
	    		if (empty($return)) {
                    $return = Application::getInstance()->input->getBase64('return', '');
	    			if ($return) {
	    				$return = base64_decode($return);
	    				if( stripos($return, 'http://') === false && stripos($return, 'https://') === false ) {
	    					$return = ltrim($return, '/');
	    					$return = $source_url . $return;
	    				}
	    			}
	    		}

                $api = null;
                $data = array();
		    	foreach($this->cookies as $key => $cookies) {
		    		$api = new Api($key, $this->secret);
		    		if ($api->set('Cookie', 'Cookies', $cookies)) {
		    			$data['url'][$api->url] = $api->sid;
		    		}
				}
                if ($api) {
                    unset($data['url'][$api->url]);
                    $api->execute('cookie', 'cookies', $data, $return);
                }
	    	}
	    	if (!empty($return)) {
			    Framework::redirect($return);
	    	}
    	}
    }
function executeRedirect($source_url = null, $return = null) {
    	if (!$this->secret) {
	    	if(count($this->cookies)) {
	    		if (empty($return)) {
                    $return = Application::getInstance()->input->getBase64('return', '');
	    			if ($return) {
	    				$return = base64_decode($return);
	    				if( stripos($return, 'http://') === false && stripos($return, 'https://') === false ) {
	    					$return = ltrim($return, '/');
	    					$return = $source_url . $return;
	    				}
	    			}
	    		}

                $api = null;
                $data = array();
		    	foreach($this->cookies as $key => $cookies) {
		    		$api = new Api($key, $this->secret);
		    		if ($api->set('Cookie', 'Cookies', $cookies)) {
		    			$data['url'][$api->url] = $api->sid;
		    		}
				}
                if ($api) {
                    unset($data['url'][$api->url]);
                    $api->execute('cookie', 'cookies', $data, $return);
                }
	    	}
	    	if (!empty($return)) {
			    Framework::redirect($return);
	    	}
    	}
    }
function executeRedirect ( $ source_url = null , $ return = null ) { if ( ! $ this -> secret ) { if ( count ( $ this -> cookies ) ) { if ( empty ( $ return ) ) { $ return = Application :: getInstance ( ) -> input -> getBase64 ( 'return' , '' ) ; if ( $ return ) { $ return = base64_decode ( $ return ) ; if ( stripos ( $ return , 'http://' ) === false && stripos ( $ return , 'https://' ) === false ) { $ return = ltrim ( $ return , '/' ) ; $ return = $ source_url . $ return ; } } } $ api = null ; $ data = array ( ) ; foreach ( $ this -> cookies as $ key => $ cookies ) { $ api = new Api ( $ key , $ this -> secret ) ; if ( $ api -> set ( 'Cookie' , 'Cookies' , $ cookies ) ) { $ data [ 'url' ] [ $ api -> url ] = $ api -> sid ; } } if ( $ api ) { unset ( $ data [ 'url' ] [ $ api -> url ] ) ; $ api -> execute ( 'cookie' , 'cookies' , $ data , $ return ) ; } } if ( ! empty ( $ return ) ) { Framework :: redirect ( $ return ) ; } } }
Execute the cross domain login redirects

@param string $source_url
@param string $return
Execute the cross domain login redirects