Small Adjustments
This commit is contained in:
parent
df0f8f36f7
commit
63b8173399
@ -1,6 +1,7 @@
|
|||||||
<?php namespace GermanAirlinesVa\Graphql\Classes;
|
<?php namespace GermanAirlinesVa\Graphql\Classes;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
|
|
||||||
class Authentication
|
class Authentication
|
||||||
{
|
{
|
||||||
@ -13,11 +14,11 @@ class Authentication
|
|||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if ($request->input('gql_session') === 'SUPER_SECRET_TOKEN') {
|
if ($request->header('Gql-Session') === 'SUPER_SECRET_KEY_HEADER') {
|
||||||
return "false";
|
return "";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return "true";
|
throw new AccessDeniedHttpException;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|||||||
@ -23,6 +23,7 @@ extend type Mutation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Aircraft {
|
type Aircraft {
|
||||||
|
id: ID!
|
||||||
aircraft_type_id: ID!
|
aircraft_type_id: ID!
|
||||||
home_airport_id: ID!
|
home_airport_id: ID!
|
||||||
name: String!
|
name: String!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user