Giter VIP home page Giter VIP logo

yii2-oauth2-server's People

Contributors

brutto avatar chofoteddy avatar damiandennis avatar dareen avatar faryshta avatar filsh avatar freezy-sk avatar hector-del-rio avatar hiqsol avatar lisps avatar mtangoo avatar neverabe avatar pdanzinger avatar roaresearch-creator avatar royxiang avatar sasha-ch avatar shcherbanich avatar simonsoftware avatar tibee avatar wilberto-dzul avatar zacksleo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

yii2-oauth2-server's Issues

401 Unauthorized - Error in body response

What steps will reproduce the problem?

When i send wrong credentials i receive wrong body response in version 4.1.1

{
"statusCode": 401,
"xdebug_message": "<tr><th align='left' bgcolor='#f57900' colspan=\"5\"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> yii\\web\\UnauthorizedHttpException: Your request was made with invalid credentials. in myproject/vendor/yiisoft/yii2/filters/auth/AuthMethod.php on line <i>93</i></th></tr>\n<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>\n<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0009</td><td bgcolor='#eeeeec' align='right'>409192</td><td bgcolor='#eeeeec'>{main}( )</td><td title='myproject/backend/web/index.php' bgcolor='#eeeeec'>.../index.php<b>:</b>0</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0227</td><td bgcolor='#eeeeec' align='right'>1889336</td><td bgcolor='#eeeeec'>yii\\web\\Application->run( )</td><td title='myproject/backend/web/index.php' bgcolor='#eeeeec'>.../index.php<b>:</b>17</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.0229</td><td bgcolor='#eeeeec' align='right'>1898696</td><td bgcolor='#eeeeec'>yii\\web\\Application->handleRequest( )</td><td title='myproject/vendor/yiisoft/yii2/base/Application.php' bgcolor='#eeeeec'>.../Application.php<b>:</b>386</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.0943</td><td bgcolor='#eeeeec' align='right'>4431872</td><td bgcolor='#eeeeec'>yii\\web\\Application->runAction( )</td><td title='myproject/vendor/yiisoft/yii2/web/Application.php' bgcolor='#eeeeec'>.../Application.php<b>:</b>103</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>5</td><td bgcolor='#eeeeec' align='center'>0.0945</td><td bgcolor='#eeeeec' align='right'>4459896</td><td bgcolor='#eeeeec'>backend\\api\\v1\\resources\\CiudadResource->runAction( )</td><td title='myproject/vendor/yiisoft/yii2/base/Module.php' bgcolor='#eeeeec'>.../Module.php<b>:</b>528</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>6</td><td bgcolor='#eeeeec' align='center'>0.0950</td><td bgcolor='#eeeeec' align='right'>4582792</td><td bgcolor='#eeeeec'>backend\\api\\VersionContainer->beforeAction( )</td><td title='myproject/vendor/yiisoft/yii2/base/Controller.php' bgcolor='#eeeeec'>.../Controller.php<b>:</b>145</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>7</td><td bgcolor='#eeeeec' align='center'>0.0950</td><td bgcolor='#eeeeec' align='right'>4582984</td><td bgcolor='#eeeeec'>backend\\api\\VersionContainer->trigger( )</td><td title='myproject/vendor/yiisoft/yii2/base/Module.php' bgcolor='#eeeeec'>.../Module.php<b>:</b>700</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>8</td><td bgcolor='#eeeeec' align='center'>0.0951</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'><a href='http://www.php.net/function.call-user-func:{/Users/neverabe/projects/tfd-rh-api/vendor/yiisoft/yii2/base/Component.php:627}' target='_new'>call_user_func:{myproject/vendor/yiisoft/yii2/base/Component.php:627}</a>\n( )</td><td title='myproject/vendor/yiisoft/yii2/base/Component.php' bgcolor='#eeeeec'>.../Component.php<b>:</b>627</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>9</td><td bgcolor='#eeeeec' align='center'>0.0951</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeFilter( )</td><td title='myproject/vendor/yiisoft/yii2/base/Component.php' bgcolor='#eeeeec'>.../Component.php<b>:</b>627</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>10</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/yiisoft/yii2/base/ActionFilter.php' bgcolor='#eeeeec'>.../ActionFilter.php<b>:</b>77</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>11</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/*******/yii2-oauth2-server/src/filters/auth/CompositeAuth.php' bgcolor='#eeeeec'>.../CompositeAuth.php<b>:</b>46</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>12</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/*******/yii2-oauth2-server/src/filters/ErrorToExceptionTrait.php' bgcolor='#eeeeec'>.../ErrorToExceptionTrait.php<b>:</b>26</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>13</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/yiisoft/yii2/filters/auth/CompositeAuth.php' bgcolor='#eeeeec'>.../CompositeAuth.php<b>:</b>57</td></tr>\n"
}

What is the expected result?

The expected result is the same like version 3.0.2

{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401,
"type": "yii\\web\\UnauthorizedHttpException"
}

What do you get instead?

Description

{
"statusCode": 401,
"xdebug_message": "<tr><th align='left' bgcolor='#f57900' colspan=\"5\"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> yii\\web\\UnauthorizedHttpException: Your request was made with invalid credentials. in myproject/vendor/yiisoft/yii2/filters/auth/AuthMethod.php on line <i>93</i></th></tr>\n<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>\n<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0009</td><td bgcolor='#eeeeec' align='right'>409192</td><td bgcolor='#eeeeec'>{main}( )</td><td title='myproject/backend/web/index.php' bgcolor='#eeeeec'>.../index.php<b>:</b>0</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0227</td><td bgcolor='#eeeeec' align='right'>1889336</td><td bgcolor='#eeeeec'>yii\\web\\Application->run( )</td><td title='myproject/backend/web/index.php' bgcolor='#eeeeec'>.../index.php<b>:</b>17</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.0229</td><td bgcolor='#eeeeec' align='right'>1898696</td><td bgcolor='#eeeeec'>yii\\web\\Application->handleRequest( )</td><td title='myproject/vendor/yiisoft/yii2/base/Application.php' bgcolor='#eeeeec'>.../Application.php<b>:</b>386</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.0943</td><td bgcolor='#eeeeec' align='right'>4431872</td><td bgcolor='#eeeeec'>yii\\web\\Application->runAction( )</td><td title='myproject/vendor/yiisoft/yii2/web/Application.php' bgcolor='#eeeeec'>.../Application.php<b>:</b>103</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>5</td><td bgcolor='#eeeeec' align='center'>0.0945</td><td bgcolor='#eeeeec' align='right'>4459896</td><td bgcolor='#eeeeec'>backend\\api\\v1\\resources\\CiudadResource->runAction( )</td><td title='myproject/vendor/yiisoft/yii2/base/Module.php' bgcolor='#eeeeec'>.../Module.php<b>:</b>528</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>6</td><td bgcolor='#eeeeec' align='center'>0.0950</td><td bgcolor='#eeeeec' align='right'>4582792</td><td bgcolor='#eeeeec'>backend\\api\\VersionContainer->beforeAction( )</td><td title='myproject/vendor/yiisoft/yii2/base/Controller.php' bgcolor='#eeeeec'>.../Controller.php<b>:</b>145</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>7</td><td bgcolor='#eeeeec' align='center'>0.0950</td><td bgcolor='#eeeeec' align='right'>4582984</td><td bgcolor='#eeeeec'>backend\\api\\VersionContainer->trigger( )</td><td title='myproject/vendor/yiisoft/yii2/base/Module.php' bgcolor='#eeeeec'>.../Module.php<b>:</b>700</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>8</td><td bgcolor='#eeeeec' align='center'>0.0951</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'><a href='http://www.php.net/function.call-user-func:{/Users/neverabe/projects/tfd-rh-api/vendor/yiisoft/yii2/base/Component.php:627}' target='_new'>call_user_func:{myproject/vendor/yiisoft/yii2/base/Component.php:627}</a>\n( )</td><td title='myproject/vendor/yiisoft/yii2/base/Component.php' bgcolor='#eeeeec'>.../Component.php<b>:</b>627</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>9</td><td bgcolor='#eeeeec' align='center'>0.0951</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeFilter( )</td><td title='myproject/vendor/yiisoft/yii2/base/Component.php' bgcolor='#eeeeec'>.../Component.php<b>:</b>627</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>10</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/yiisoft/yii2/base/ActionFilter.php' bgcolor='#eeeeec'>.../ActionFilter.php<b>:</b>77</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>11</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/*******/yii2-oauth2-server/src/filters/auth/CompositeAuth.php' bgcolor='#eeeeec'>.../CompositeAuth.php<b>:</b>46</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>12</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/*******/yii2-oauth2-server/src/filters/ErrorToExceptionTrait.php' bgcolor='#eeeeec'>.../ErrorToExceptionTrait.php<b>:</b>26</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>13</td><td bgcolor='#eeeeec' align='center'>0.0952</td><td bgcolor='#eeeeec' align='right'>4586864</td><td bgcolor='#eeeeec'>*******\\oauth2server\\filters\\auth\\CompositeAuth->beforeAction( )</td><td title='myproject/vendor/yiisoft/yii2/filters/auth/CompositeAuth.php' bgcolor='#eeeeec'>.../CompositeAuth.php<b>:</b>57</td></tr>\n"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.