Beispiel #1
0
 /**
  * @throws InvalidAppIdException
  */
 private function verifyApplicationId()
 {
     if (!boolval(array_get($this->config, 'verifyAppId'))) {
         return;
     }
     $possible = array_get($this->config, 'applicationIds');
     //Somebody might use the .env files and set the applicationIds as a string instead of an array so we'll be sure
     if (!is_array($possible)) {
         $possible = array($possible);
     }
     $appId = $this->alexaRequest->getAppId();
     if (!in_array($appId, $possible)) {
         throw new InvalidAppIdException("The request's app id does not match the configured app id(s)");
     }
 }