mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-01-10 22:02:05 +05:30
updated calls to proper request methods
This commit is contained in:
parent
54c2c48704
commit
07c04d15d7
@ -71,10 +71,10 @@ class OAuthException extends \Exception
|
|||||||
if ($this->errorType === '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->getUser() !== null) {
|
||||||
$authScheme = 'Basic';
|
$authScheme = 'Basic';
|
||||||
} else {
|
} else {
|
||||||
$authHeader = $request->header('Authorization');
|
$authHeader = $request->headers->get('Authorization');
|
||||||
if ($authHeader !== null) {
|
if ($authHeader !== null) {
|
||||||
if (strpos($authHeader, 'Bearer') === 0) {
|
if (strpos($authHeader, 'Bearer') === 0) {
|
||||||
$authScheme = 'Bearer';
|
$authScheme = 'Bearer';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user