Skip to content

Commit

Permalink
Merge pull request #143 from JoshuaLicense/add-id-token-to-serialize
Browse files Browse the repository at this point in the history
Include `id_token` in `jsonSerialize` of `AccessToken` object
  • Loading branch information
hajekj authored Jun 22, 2022
2 parents 56e0776 + 833433d commit 0a322e0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Token/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,18 @@ public function getIdTokenClaims()
{
return $this->idTokenClaims;
}

/**
* @inheritdoc
*/
public function jsonSerialize()
{
$parameters = parent::jsonSerialize();

if ($this->idToken) {
$parameters['id_token'] = $this->idToken;
}

return $parameters;
}
}

0 comments on commit 0a322e0

Please sign in to comment.