Skip to content

Commit

Permalink
Merge pull request #98 from erikdonohoo/master
Browse files Browse the repository at this point in the history
Allow LtiMessgageLaunch validation steps to be modified by tool providers
  • Loading branch information
dbhynds authored Sep 6, 2023
2 parents ab2ce8a + facb841 commit aa16c6f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/LtiMessageLaunch.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private function cacheLaunchData()
return $this;
}

private function validateState()
protected function validateState()
{
// Check State for OIDC.
if ($this->cookie->getCookie(LtiOidcLogin::COOKIE_PREFIX.$this->request['state']) !== $this->request['state']) {
Expand All @@ -384,7 +384,7 @@ private function validateState()
return $this;
}

private function validateJwtFormat()
protected function validateJwtFormat()
{
$jwt = $this->request['id_token'] ?? null;

Expand All @@ -408,7 +408,7 @@ private function validateJwtFormat()
return $this;
}

private function validateNonce()
protected function validateNonce()
{
if (!isset($this->jwt['body']['nonce'])) {
throw new LtiException(static::ERR_MISSING_NONCE);
Expand All @@ -420,7 +420,7 @@ private function validateNonce()
return $this;
}

private function validateRegistration()
protected function validateRegistration()
{
// Find registration.
$clientId = is_array($this->jwt['body']['aud']) ? $this->jwt['body']['aud'][0] : $this->jwt['body']['aud'];
Expand All @@ -440,7 +440,7 @@ private function validateRegistration()
return $this;
}

private function validateJwtSignature()
protected function validateJwtSignature()
{
if (!isset($this->jwt['header']['kid'])) {
throw new LtiException(static::ERR_NO_KID);
Expand All @@ -461,7 +461,7 @@ private function validateJwtSignature()
return $this;
}

private function validateDeployment()
protected function validateDeployment()
{
if (!isset($this->jwt['body'][LtiConstants::DEPLOYMENT_ID])) {
throw new LtiException(static::ERR_MISSING_DEPLOYEMENT_ID);
Expand All @@ -479,7 +479,7 @@ private function validateDeployment()
return $this;
}

private function validateMessage()
protected function validateMessage()
{
if (empty($this->jwt['body'][LtiConstants::MESSAGE_TYPE])) {
// Unable to identify message type.
Expand Down

0 comments on commit aa16c6f

Please sign in to comment.