Skip to content

Commit

Permalink
Return early if payload is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 2, 2016
1 parent 3ffcb9b commit c62e76c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Auth/JwtAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ public function getUser(Request $request)
{
$payload = $this->getPayload($request);

if (empty($payload)) {
return false;
}

if (!$this->_config['queryDatasource']) {
return json_decode(json_encode($payload), true);
}
Expand Down

0 comments on commit c62e76c

Please sign in to comment.