mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-10 05:47:48 +05:30
Bug fix for OAuthException
This commit is contained in:
parent
82c10c32fd
commit
184fac507b
@ -29,9 +29,9 @@ class OAuthException extends \Exception
|
|||||||
/**
|
/**
|
||||||
* Throw a new exception
|
* Throw a new exception
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct($msg = 'An error occured')
|
||||||
{
|
{
|
||||||
parent::__construct('An error occured');
|
parent::__construct($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,7 +66,7 @@ class OAuthException extends \Exception
|
|||||||
// include the "WWW-Authenticate" response header field
|
// include the "WWW-Authenticate" response header field
|
||||||
// matching the authentication scheme used by the client.
|
// matching the authentication scheme used by the client.
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
if ($error === 'invalid_client') {
|
if ($this->errorType === 'invalid_client') {
|
||||||
$authScheme = null;
|
$authScheme = null;
|
||||||
$request = new Request();
|
$request = new Request();
|
||||||
if ($request->server('PHP_AUTH_USER') !== null) {
|
if ($request->server('PHP_AUTH_USER') !== null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user