src/Authentication/JWTAuthenticationHandler.php 1 location
|
@@ 50-52 (lines=3) @@
|
| 47 |
|
{ |
| 48 |
|
$authHeader = $request->getHeader('Authorization'); |
| 49 |
|
$member = null; |
| 50 |
|
if ($authHeader && preg_match('/Bearer\s+(.*)$/i', $authHeader, $matches)) { |
| 51 |
|
$member = $this->authenticator->authenticate(['token' => $matches[1]], $request); |
| 52 |
|
} |
| 53 |
|
if ($member) { |
| 54 |
|
$this->logIn($member); |
| 55 |
|
} else { |
src/Mutations/RefreshTokenMutationCreator.php 1 location
|
@@ 51-53 (lines=3) @@
|
| 48 |
|
$authenticator = Injector::inst()->get(JWTAuthenticator::class); |
| 49 |
|
$member = null; |
| 50 |
|
$result = new ValidationResult(); |
| 51 |
|
if ($authHeader && preg_match('/Bearer\s+(.*)$/i', $authHeader, $matches)) { |
| 52 |
|
$member = $authenticator->authenticate(['token' => $matches[1]], $request, $result); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
$expired = false; |
| 56 |
|
if ($member === null) { |