Skip to content

Commit

Permalink
Merge pull request #144 from JoshuaLicense/add-method-to-retrieve-id-…
Browse files Browse the repository at this point in the history
…token

Add method to retrieve raw `id_token` from `AccessToken` object
  • Loading branch information
hajekj authored Jun 22, 2022
2 parents 0a322e0 + 60558d7 commit 49b58be
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
composer.phar
composer.lock
.DS_Store

# IDE
/.idea
/.vscode
7 changes: 7 additions & 0 deletions src/Token/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public function __construct(array $options, $provider)
if (!empty($options['id_token'])) {
$this->idToken = $options['id_token'];

unset($this->values['id_token']);

$keys = $provider->getJwtVerificationKeys();
$idTokenClaims = null;
try {
Expand All @@ -45,6 +47,11 @@ public function __construct(array $options, $provider)
}
}

public function getIdToken()
{
return $this->idToken;
}

public function getIdTokenClaims()
{
return $this->idTokenClaims;
Expand Down

0 comments on commit 49b58be

Please sign in to comment.