<?php namespace GermanAirlinesVa\Graphql;

use Closure;

class Authentication
{
  /**
   * Handle an incoming request.
   *
   * @param  \Illuminate\Http\Request  $request
   * @param  \Closure  $next
   * @return mixed
   */
  public function handle($request, Closure $next)
  {
    if ($request->input('gql_session') === 'SUPER_SECRET_TOKEN') {
      return 'false';
    } else {
      return 'true';
    }

    return $next($request);
  }
}
