get module instance via module property of Controller
replace Yii::$app->getModule('oauth2') with $this->module
Merge pull request #3 from wenbin1989/master

get module instance via module property of Controller