filsh/yii2-oauth2-server

Error with users when i tried to autehticate with postman extension for Google Chrome

josejesusguzman opened this issue · 1 comments

{
  "name": "Exception",
  "message": "Call to undefined method app\\models\\User::findByUsername()",
  "code": 0,
  "type": "Error",
  "file": "/var/www/oauth/models/User.php",
  "line": 27,
  "stack-trace": [
    "#0 /var/www/oauth/vendor/bshaffer/oauth2-server-php/src/OAuth2/GrantType/UserCredentials.php(41): app\\models\\User->checkUserCredentials('jesus', 'password')",
    "#1 /var/www/oauth/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/TokenController.php(124): OAuth2\\GrantType\\UserCredentials->validateRequest(Object(filsh\\yii2\\oauth2server\\Request), Object(OAuth2\\Response))",
    "#2 /var/www/oauth/vendor/bshaffer/oauth2-server-php/src/OAuth2/Controller/TokenController.php(49): OAuth2\\Controller\\TokenController->grantAccessToken(Object(filsh\\yii2\\oauth2server\\Request), Object(OAuth2\\Response))",
    "#3 /var/www/oauth/vendor/bshaffer/oauth2-server-php/src/OAuth2/Server.php(259): OAuth2\\Controller\\TokenController->handleTokenRequest(Object(filsh\\yii2\\oauth2server\\Request), Object(OAuth2\\Response))",
    "#4 /var/www/oauth/vendor/filsh/yii2-oauth2-server/Server.php(39): OAuth2\\Server->handleTokenRequest(Object(filsh\\yii2\\oauth2server\\Request), NULL)",
    "#5 /var/www/oauth/vendor/filsh/yii2-oauth2-server/controllers/RestController.php(25): filsh\\yii2\\oauth2server\\Server->handleTokenRequest()",
    "#6 [internal function]: filsh\\yii2\\oauth2server\\controllers\\RestController->actionToken()",
    "#7 /var/www/oauth/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)",
    "#8 /var/www/oauth/vendor/yiisoft/yii2/base/Controller.php(154): yii\\base\\InlineAction->runWithParams(Array)",
    "#9 /var/www/oauth/vendor/yiisoft/yii2/base/Module.php(454): yii\\base\\Controller->runAction('token', Array)",
    "#10 /var/www/oauth/vendor/yiisoft/yii2/web/Application.php(87): yii\\base\\Module->runAction('oauth2/rest/tok...', Array)",
    "#11 /var/www/oauth/vendor/yiisoft/yii2/base/Application.php(375): yii\\web\\Application->handleRequest(Object(yii\\web\\Request))",
    "#12 /var/www/oauth/web/index.php(12): yii\\base\\Application->run()",
    "#13 {main}"
  ]
}
varp commented

Fixed in the latest release!