Skip to content

Commit

Permalink
changed order of array merge in JWT (#1222)
Browse files Browse the repository at this point in the history
* changed order of array merge in JWT to allow inline to overwrite default custom claim

* syntax is important
  • Loading branch information
miscbits authored and tymondesigns committed Jun 22, 2017
1 parent 57853c0 commit 69973ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ protected function getClaimsArray(JWTSubject $subject)
{
return array_merge(
$this->getClaimsForSubject($subject),
$this->customClaims, // custom claims from inline setter
$subject->getJWTCustomClaims() // custom claims from JWTSubject method
$subject->getJWTCustomClaims(), // custom claims from JWTSubject method
$this->customClaims // custom claims from inline setter
);
}

Expand Down

0 comments on commit 69973ed

Please sign in to comment.