Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

State information lost #2

Open
mnkq opened this issue Oct 13, 2015 · 1 comment
Open

State information lost #2

mnkq opened this issue Oct 13, 2015 · 1 comment

Comments

@mnkq
Copy link

mnkq commented Oct 13, 2015

hi asasmoyo, i tried to use simplesaml in my yii aplication..

i already follow your instruction.. but i found this error..

SimpleSAML_Error_NoState: NOSTATE
Backtrace:
2 C:\xampp\htdocs\wwwtest\simplesamlphp\lib\SimpleSAML\Auth\State.php:232 (SimpleSAML_Auth_State::loadState)
1 C:\xampp\htdocs\wwwtest\simplesamlphp\modules\saml\www\sp\saml2-acs.php:54 (require)
0 C:\xampp\htdocs\wwwtest\simplesamlphp\www\module.php:135 (N/A)

this is my main.php in config..

...
'components'=>array(

    'simplesamlphp' => array( 
        'class' => 'ext.yii-simplesamlphp.components.Simplesamlphp',
        'autoloadPath' => '../simplesamlphp/lib/_autoload.php',
        'authSource' => 'default-sp',
    ),  

    'user'=>array(
        // enable cookie-based authentication
        'allowAutoLogin'=>true,
        'class' => 'ext.yii-simplesamlphp.components.SSOWebUser',
    ),

and this is my sitecontroller.php..

...
public function actions()
{
return array(
// captcha action renders the CAPTCHA image displayed on the contact page
'captcha'=>array(
'class'=>'CCaptchaAction',
'backColor'=>0xFFFFFF,
),
// page action renders "static" pages stored under 'protected/views/site/pages'
// They can be accessed via: index.php?r=site/page&view=FileName
'page'=>array(
'class'=>'CViewAction',
),

        'login' => array(
            'class' => 'ext.yii-simplesamlphp.actions.LoginAction',
            'simplesamlphpComponentName' => 'simplesamlphp',
            'redirectAfterLoginTo' => array('/index.php/pegawai'),
        ),
        'logout' => array(
            'class' => 'ext.yii-simplesamlphp.actions.LogoutAction',
            'simplesamlphpComponentName' => 'simplesamlphp',
            'redirectAfterLogoutTo' => array('/logoutex.php'),
        ),          

    );
}

/**
 * This is the default 'index' action that is invoked
 * when an action is not explicitly requested by users.
 */
public function actionIndex()
{
    if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')){
        $this->render('logi') ;}
    else {

         if (Yii::app()->user->isGuest) {
            Yii::app()->simplesamlphp->login();
        } else {
            $this->redirect(Yii::app()->request->baseUrl.'/index.php/pegawai'); 
        }
    }
}

can you help me please..

@asasmoyo
Copy link
Owner

I think there is problem with your simplesamlphp's session storage, and i thik it is very similar like #1. Do you change your simplesamlphp's session storage? Can you try use database for your session storage?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants