validateStructure($value); } /** * @param string $token * @throws \Tymon\JWTAuth\Exceptions\TokenInvalidException * @return boolean */ protected function validateStructure($token) { if (count(explode('.', $token)) !== 3) { throw new TokenInvalidException('Wrong number of segments'); } return true; } }