Skip to content

Commit

Permalink
Fixing parsing token header in reader
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Aug 29, 2024
1 parent 8ceb425 commit c07a311
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Security/TokenReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function read(ServerRequestInterface $request): JWT\UnencryptedToken|null

if (
is_string($headerJWT)
&& preg_match(SimpleAuth\Constants::TOKEN_HEADER_REGEXP, $headerJWT, $matches) !== false
&& preg_match(SimpleAuth\Constants::TOKEN_HEADER_REGEXP, $headerJWT, $matches) === 1
&& $matches[1] !== ''
) {
$token = $this->tokenValidator->validate($matches[1]);

Expand Down

0 comments on commit c07a311

Please sign in to comment.