src/Http/Middleware/Certificate.php
public function handle($request, Closure $next)
    {
        if (!$this->alexaRequest->isAlexaRequest()) {
            return $next($request);
        }

        $this->verifyApplicationId();
        $this->checkTimestampTolerance();
        $certificateResult = $this->verifyCertificate($request);

        if ($certificateResult === 1) {
            return $next($request);
        } elseif ($certificateResult === 0) {
            throw new InvalidSignatureChainException("The request did not validate against the certificate chain.");
        } else {
            throw new \Exception("Something went wrong when validating the request and certificate.");
        }
    }
public function handle($request, Closure $next)
    {
        if (!$this->alexaRequest->isAlexaRequest()) {
            return $next($request);
        }

        $this->verifyApplicationId();
        $this->checkTimestampTolerance();
        $certificateResult = $this->verifyCertificate($request);

        if ($certificateResult === 1) {
            return $next($request);
        } elseif ($certificateResult === 0) {
            throw new InvalidSignatureChainException("The request did not validate against the certificate chain.");
        } else {
            throw new \Exception("Something went wrong when validating the request and certificate.");
        }
    }
Handle an incoming request.

@param  \Illuminate\Http\Request $request
@param  \Closure                 $next

@return mixed

@throws InvalidSignatureChainException
@throws \Exception