Skip to content

Commit

Permalink
fix(php): Dont use compact
Browse files Browse the repository at this point in the history
  • Loading branch information
tymondesigns committed Jan 20, 2020
1 parent 1037397 commit ca33c64
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,16 @@ public function invalidate(Token $token, $forceForever = false)
*/
protected function buildRefreshClaims(Payload $payload)
{
// assign the payload values as variables for use later
extract($payload->toArray());
// Get the claims to be persisted from the payload
$persistentClaims = collect($payload->toArray())
->only($this->persistentClaims)
->toArray();

// persist the relevant claims
return array_merge(
$this->customClaims,
compact($this->persistentClaims, 'sub', 'iat')
$persistentClaims,
$payload->get(['sub', 'iat']),
);
}

Expand Down

0 comments on commit ca33c64

Please sign in to comment.