visuddhinanda пре 3 година
родитељ
комит
837e5500a2
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      app/Http/Api/AuthApi.php

+ 3 - 0
app/Http/Api/AuthApi.php

@@ -13,6 +13,9 @@ class AuthApi{
             Log::info('token:'.$token);
             if(\substr($token,0,6) === 'Bearer'){
                 $token = trim(substr($token,6));
+                if($token === "null"){
+                    return false;
+                }
                 $jwt = JWT::decode($token,new Key(env('APP_KEY'),'HS512'));
                 if($jwt->exp < time()){
                     return false;