Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 5c812bc

Browse files
committed
Revert "#8 use getHeaderLine() instead of getHeader()"
This reverts commit 29e27fd.
1 parent 2fe9738 commit 5c812bc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BasicAccess.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public function __construct(
5252

5353
public function authenticate(ServerRequestInterface $request) : ?UserInterface
5454
{
55-
$authHeader = $request->getHeaderLine('Authorization');
56-
if ('' === $authHeader) {
55+
$authHeader = $request->getHeader('Authorization');
56+
if (! isset($authHeader[0])) {
5757
return null;
5858
}
5959

60-
if (! preg_match('/Basic (?P<credentials>.+)/', $authHeader, $match)) {
60+
if (! preg_match('/Basic (?P<credentials>.+)/', $authHeader[0], $match)) {
6161
return null;
6262
}
6363

0 commit comments

Comments
 (0)