예제 #1
0
파일: Session.php 프로젝트: df-arif/df-core
 /**
  * @return bool
  */
 public static function logout()
 {
     $token = static::getSessionToken();
     if (empty($token)) {
         return false;
     }
     JWTUtilities::invalidate($token);
     return true;
 }
예제 #2
0
 /**
  * @return bool
  * @throws \Exception
  */
 public static function logout()
 {
     $token = static::getSessionToken();
     if (empty($token)) {
         return false;
     }
     try {
         JWTUtilities::invalidate($token);
     } catch (\Exception $e) {
         if (!$e instanceof TokenBlacklistedException) {
             throw $e;
         }
     }
     return true;
 }