Yii2 API authentication Behaviors() Not working -


i creating restful api in yii2. here facing issue. in usercontroller.php have created behaviour() authentication.

use yii\filters\auth\httpbasicauth;  public function behaviors() {     $behaviors = parent::behaviors();     $behaviors['authenticator'] = [         'class' => httpbasicauth::classname(),         'except' => ['signup']     ];     return $behaviors; } 

here have passed 'except' => ['signup'], authentication should not applied 'signup' action.

but here not applied , asking authentication 'signup' action too.

so, please guide have mistaken.

public function behaviors() {     $behaviors = parent::behaviors();     $behaviors['authenticator'] = [         [             'class' => httpbasicauth::classname(),             'except' => ['signup']         ]     ];     return $behaviors; } 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -