forked from Nodge/yii-eauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEAuthRedirectWidget.php
47 lines (40 loc) · 996 Bytes
/
EAuthRedirectWidget.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* EAuthRedirectWidget class file.
*
* @author Maxim Zemskov <[email protected]>
* @link http://github.com/Nodge/yii-eauth/
* @license http://www.opensource.org/licenses/bsd-license.php
*/
/**
* The EAuthRedirectWidget widget displays the redirect page after returning from provider.
*
* @package application.extensions.eauth
*/
class EAuthRedirectWidget extends CWidget {
/**
* @var mixed the widget mode. Default to "login".
*/
public $url = null;
/**
* @var boolean whether to use redirect inside the popup window.
*/
public $redirect = true;
public $view = 'redirect';
public $params = array();
/**
* Executes the widget.
*/
public function run() {
$assets_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
$this->render($this->view,
CMap::mergeArray(array(
'id' => $this->getId(),
'url' => $this->url,
'redirect' => $this->redirect,
'assets_path' => $assets_path
), $this->params)
);
Yii::app()->end();
}
}