Skip to content

Commit

Permalink
feat: get ltiMessage token
Browse files Browse the repository at this point in the history
  • Loading branch information
SultanSagi committed Jul 3, 2024
1 parent e464bdd commit 00b8da7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Message/Payload/LtiMessagePayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,11 @@ public function getBasicOutcome(): ?BasicOutcomeClaim
{
return $this->getClaim(BasicOutcomeClaim::class);
}

public function getLtiTokenExpired(): bool
{
$exp = $this->getMandatoryClaim(static::CLAIM_EXP);

return time() - $exp;
}
}
2 changes: 2 additions & 0 deletions src/Message/Payload/LtiMessagePayloadInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,6 @@ public function getAgs(): ?AgsClaim;
public function getNrps(): ?NrpsClaim;

public function getBasicOutcome(): ?BasicOutcomeClaim;

public function getLtiTokenExpired(): bool;
}

0 comments on commit 00b8da7

Please sign in to comment.