Issue
in my controller I have this below behaviour function:
public function behaviors()
{
return [
'verbs' => [
'class' => \yii\filters\VerbFilter::className(),
'actions' => [
'verifym' => ['OPTIONS','POST','GET']
]
],
'access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
[
'allow' => true,
'actions' => [
'index', 'payment', 'result', 'verify',
'paymentvalidation'
],
'roles' => [ 'user' ]
],
[
'allow' => true,
'actions' => ['verifym'],
'roles' => ['*']
]
],
'denyCallback' => function ($rule, $action) {
$this->redirect([ '/' ]);
return null;
}
]
];
}
When from outside referrer calls verifym
action it not fires, and denyCallBack
fires.
And user identity is null.
Why denyCallBack
is fire and what change needs in my access rule for this?
Why user identity is null and How can access to that in callback process?
Why after callback from other different domain, user identity and sessions is null and with a refresh it take values?
Can anyone help me?
Solution
It seems after calling back my url from other specific domain, it's blocked their headers in request and Yii framework identity checks some headers by reading them from request's header. So I configured it by send and get some parameters between request and response.
Answered By - parsa
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.