Giter Site home page Giter Site logo

wifidog / wifidog-auth Goto Github PK

View Code? Open in Web Editor NEW
196.0 38.0 121.0 6.31 MB

Repository for the PHP wifidog captive portal auth server

Shell 0.29% PLpgSQL 2.73% PHP 88.91% HTML 0.22% ApacheConf 0.03% XSLT 0.30% JavaScript 1.80% Perl 0.01% CSS 2.89% Smarty 2.82%

wifidog-auth's People

Contributors

acv avatar benoitg avatar drazzib avatar first-leon avatar florida63 avatar fproulx avatar gorgonzola avatar lokkju avatar networkfusion avatar pascalcharest avatar ronald-hristov avatar tahini avatar yzh0304 avatar zhao-gang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifidog-auth's Issues

cannot connect database when install.php

Database connection

Trying to open a Postgresql database connection :

Unable to connect to database! Please make sure the server is online and the database "" exists. Also 'postgresql.conf' and 'pg_hba.conf' must allow the user "" to open a connection to it on host "" port 0 to continue. See the error above for clues on what the problem may be.

Please go back and retry with correct values, or fix your server configuration.

Refresh

How to implement my own wifidog-auth?

Hi,

Sorry for posting here, I don't know where to ask (mailing list is dead, nobody in IRC channel), consider this is a feature request for document.

I want to implement my our own wifidog-auth which can

  • authenticate via LDAP (only staffs can access the WIFI access point, I know FreeRADIUS server has this feature, but I want to implement the following features too)
  • authenticate via phone extension (yeah, when user click login, my own wifidog-auth will try to call extension number of this staff: [my own wifi-auth running on an Asterisk server]->[create a .call file for Asterisk]->[call to staff's extension and put this call into an IVR], and then the staff must enter his/her phone password on dialpad of the phone to authenticate)
  • authenticate via mobile phone SMS (we have a SMS api provided by a SP. before login, user must retrieve a random code from his mobile phone, then input that random code as password to authenticate)

I can write the web stuffs (JSP), but I don't know how to communicate with wifi-gateway: What/How should I return to the gateway if login is sucessful or failed?

authenticate guest one time

Hi all!

The issue i'm trying to resolve is when a guest connect for the first time to a gateway, the auth server has to remember him, so when he come back he will not be redirected to splash page but connected automatically, using this we can optimise UX. I think we should add a verification based on the couple {MAC, GwID} if it returns False then we proceed as a normal, else guest bypass the normal process.

waiting for your thoughts.

Could wifidog be used on android?And how?

Hi,I want to build a public hot spot and everyone could access the Internet after authorization.Since I succeeded on my router based on OpenWRT,using wifidog and authpuppy,could it be used on android?(We also want to integrate the wifidog into our android device.)And how ?

Authpuppy with Hybridauth

Hi.
Did anyone try to use hybridauth as authentication method for authpuppy? How did it? I'm trying but there is a lack of documentation , I have many doubts about it. Thanks

error when connect to database using install.php

I'm using postgresql 9.3, test user/password manually connect successfully but can not update using install.php.

http://imgur.com/a/qHeAb

Seems like it's can not get $CONF_DATABASE_NAME, $CONF_DATABASE_PORT, $CONF_DATABASE_USER, $CONF_DATABASE_HOST.

Anyway to manually apply scripts to DB and bring up the site?

Thank you.

config.php is not being saved correctly

When the config.php is saved after the Database Access Configuration step from the install.php, its content get messed up.

It looks like this:

<?php;;/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */;;// +-------------------------------------------------------------------+;// | WiFiDog Authentication Server                                     |;// | =============================                                     |;// |                                                                   |;// | The WiFiDog Authentication Server is part of the WiFiDog captive  |;// | portal suite.                                                     |;// +-------------------------------------------------------------------+;// | PHP version 5 required.                                           |;// +-------------------------------------------------------------------+;// | Homepage:     http://www.wifidog.org/                             |;// | Source Forge: http://sourceforge.net/projects/wifidog/            |;// +-------------------------------------------------------------------+;// | This program is free software;you can redistribute it and/or     |;// | modify it under the terms of the GNU General Public License as    |;// | published by the Free Software Foundation;either version 2 of    |;// | the License, or (at your option) any later version.               |;// |                                                                   |;// | This program is distributed in the hope that it will be useful,   |;// | but WITHOUT ANY WARRANTY;without even the implied warranty of    |;// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     |;// | GNU General Public License for more details.                      |;// |                                                                   |;// | You should have received a copy of the GNU General Public License |;// | along with this program;if not, contact:                         |;// |                                                                   |;// | Free Software Foundation           Voice:  +1-617-542-5942        |;// | 59 Temple Place - Suite 330        Fax:    +1-617-542-2652        |;// | Boston, MA  02111-1307,  USA       [email protected]                    |;// |                                                                   |;// +-------------------------------------------------------------------+;;/**;* Configuration file of WiFiDog Authentication Server;*;* The configure the WiFiDOG auth server you can either use this configuration;* file or make a local copy of it named local.config.php.;*;* @package    WiFiDogAuthServer;* @author     Benoit Grégoire <[email protected]>;* @author     Max Horváth <[email protected]>;* @copyright  2004-2006 Benoit Grégoire, Technologies Coeus inc.;* @copyright  2005-2006 Max Horváth, Horvath Web Consulting;* @version    Subversion $Id$;* @link       http://www.wifidog.org/;*/;;/**;* In case this is the local.config.php you should remove the next lines.;*/;;if (file_exists(dirname(__FILE__) . "/local.config.php")) {;// Use a local copy of the configuration if found instead of the distro's.;require dirname(__FILE__) . "/local.config.php";;} else {;;/**;* In case this is the local.config.php stop removing the lines.;*/;;/********************************************************************\;* DATABASE CONFIGURATION                                           *;\********************************************************************/;;/**;* Configuration values needed to access the database.;* ===================================================;*/;;// Host of the database server.;define('CONF_DATABASE_HOST', 'localhost');
;;;;;;;// Port of the database server.;define('CONF_DATABASE_PORT', '5432');
;;;;;;;// Username for database access.;define('CONF_DATABASE_USER', 'postgres');
;;;;;;;// Password for database access.;define('CONF_DATABASE_PASSWORD', 'dF*/22Ke$%');
;;;;;;;// Name of database used by WiFiDOG auth server.;define('CONF_DATABASE_NAME', 'wifidog');
;;;;;;;/**;* Database cleanup;* ================;*;* Normally,  the database cleanup routines will be called everytime a portal;* page is displayed. If you set this to true, you must set a cron job on the;* server which will execute the script "cron/cleanup.php".;*/;define('CONF_USE_CRON_FOR_DB_CLEANUP', false);;;/**;* SQL queries profiling.  This will output all SQL queries performed to;* generate the page, as well as the relative time used by each.;*/;;define('LOG_SQL_QUERIES', false);;;/**;* Log content display.  If set to true, every piece of content displayed to a user will;* be logged in a log table.;*/;;define('LOG_CONTENT_DISPLAY', false);;;/********************************************************************\;* WEBSERVER CONFIGURATION                                          *;\********************************************************************/;;/**;* Caching;* =======;*;* Experimental:  If you installed PEAR::Cache_Lite and set this value to true, additional caching;* will be enabled.;*;* If you haven't installed PEAR::Cache_Lite, caching won't be enabled at all.;*/;define('USE_CACHE_LITE', false);;;/**;* Timezone;* ========;*;* Since PHP 5.1.0 date functions have been rewritten and require to set;* a valid timezone.  This is ONLY used on PHP >=5.1;*;* You'll find a list of valid identifiers at:;* http://www.php.net/manual/en/timezones.php;*/;define('DATE_TIMEZONE', 'Canada/Eastern');;;/********************************************************************\;* WIFIDOG BASIC CONFIGURATION                                      *;\********************************************************************/;;/**;* Custom signup system;* ====================;*;* If you wanto to use a custom signup system instead of the built in signup;* page uncomment the next line and enter the URL to the system.;*/;//define("CUSTOM_SIGNUP_URL","https://www.bcwireless.net/hotspot/signup.php");;;/**;* Default language;* ================;*;* Define the default language of the WiFiDOG auth server.  The language code;* (the part before the _) must be part of the array above (the country;* subcode may differ, and should be set to your country subcode);*/;define('DEFAULT_LANG', 'fr_CA');;;/********************************************************************\;* WIFIDOG FEATURES CONFIGURATION                                   *;\********************************************************************/;;/**;* Google Maps support;* ===================;*;* Enable Google Maps mapping using "hotspots_map.php".;*/;define('GMAPS_HOTSPOTS_MAP_ENABLED', true);;;/********************************************************************\;* ADVANCED CONFIGURATION                                           *;*                                                                  *;* You should normally not have to edit anything below this!        *;\********************************************************************/;;/**;* Path of WiFiDOG auth server installation;* ========================================;*;* SYSTEM_PATH must be set to the url path needed to reach the wifidog;* directory.;*;* Normally '/' or '/wifidog/', depending on where configure your;* document root.;*;* Gateway configuration must match this as well.;*;* CONFIGURATION FLAG REQUIRED IF PATH DETECTION FAILS, ONLY!;*/;// define('SYSTEM_PATH', '/');;;/**;* WiFiDOG configuration;* =====================;*;* Name and version of the WiFiDOG auth server.;*/;define('WIFIDOG_NAME', 'WiFiDog Authentication server');;define('WIFIDOG_VERSION', '(Development)');;;/**;* WiFiDOG internals configuration;* ===============================;*;* Internal configuration values for WiFiDog - don't touch!;*/;;// Filenames and directories;define('NETWORK_THEME_PACKS_DIR', 'media/network_theme_packs/');;define('STYLESHEET_NAME', 'stylesheet.css');;define('PRINT_STYLESHEET_NAME', 'printer.css');;define('LOGIN_PAGE_NAME', 'login.html');;define('HOTSPOT_STATUS_PAGE', 'hotspot_status.php');;define('NODE_PUBLIC_STATS_DIR', "public_stats/");;;// Source URL for the hotspot status page;define('GMAPS_XML_SOURCE_URL', 'hotspot_status.php?format=XML');;;//Enable logging by the EventLogging class;define('EVENT_LOGGING',false);;// Declare warning/error/notice logging to a file.;// Set this to false to disable logging to a file.;// By default, logging is enabled, to file tmp/wifidog.log.;// define('WIFIDOG_LOGFILE', 'tmp/wifidog.log');;;/**;* Email configuration;* ===============================;*;* Internal configuration values for WiFiDog - don't touch!;*/;;define('EMAIL_MAILER', 'mail');// "mail", "sendmail", or "smtp";;// Valid only for SMTP;define('EMAIL_HOST', '');;define('EMAIL_AUTH', false);;;// Valid if EMAIL_AUTH is true;define('EMAIL_USERNAME', '');;define('EMAIL_PASSWORD', '');;;/**;* In case this is the local.config.php you should remove the next lines.;*/;;};;/**;* In case this is the local.config.php stop removing the lines.;*/;;/*;* Local variables:;* tab-width: 4;* c-basic-offset: 4;* c-hanging-comment-ender-p: nil;* End:;*/;;?>;;;;;;

In reality I only got this step to work after a change on the install.php itself.

Stuck On Administration Account

When I follow the install.php steps he ask me to create an administrator account when i create it i stuck there i can't finish the installation can anyone help please.
user

PHP 5.6 incompatibility

Running the server on a PHP 5.6 installation, on step Database Initialisation we see the following:

Runtime Notice: Declaration of File::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/File/File.php
Runtime Notice: Declaration of ContentGroupElement::processNewContentUI() should be compatible with Content::processNewContentUI($user_prefix) in /var/www/html/classes/Content/ContentGroup/ContentGroupElement.php
Runtime Notice: Declaration of ContentGroupElement::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/ContentGroup/ContentGroupElement.php
Runtime Notice: Declaration of Node::freeObject() should be compatible with HotspotGraphElement::freeObject($id, $type) in /var/www/html/classes/Node.php on line 65
Runtime Notice: Declaration of Node::createNewObject() should be compatible with HotspotGraphElement::createNewObject($element_id, $element_type, $parent_element = NULL) in /var/www/html/classes/Node.php on line 65
Runtime Notice: Declaration of EmbeddedContent::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/EmbeddedContent/EmbeddedContent.php
Runtime Notice: Declaration of Langstring::processNewUI() should be compatible with Content::processNewUI($contentId, $checkOnly = false, $userData = NULL) in /var/www/html/classes/Content/Langstring/Langstring.php
Runtime Notice: Declaration of Langstring::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/Langstring/Langstring.php
Runtime Notice: Declaration of IFrame::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/IFrame/IFrame.php
Runtime Notice: Declaration of PatternLanguage::getUserUI() should be compatible with ContentGroup::getUserUI($hide_elements = false) in /var/www/html/classes/Content/PatternLanguage/PatternLanguage.php
Runtime Notice: Declaration of PatternLanguage::getAllContent() should be compatible with Content::getAllContent($content_type = '') in /var/www/html/classes/Content/PatternLanguage/PatternLanguage.php
Runtime Notice: Declaration of RssAggregator::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/RssAggregator/RssAggregator.php
Runtime Notice: Declaration of ShoutBox::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/ShoutBox/ShoutBox.php
Runtime Notice: Declaration of SmartyTemplate::getString() should be compatible with Langstring::getString($verbose = true) in /var/www/html/classes/Content/SmartyTemplate/SmartyTemplate.php
Runtime Notice: Declaration of UIAllowedBandwidth::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/UIAllowedBandwidth/UIAllowedBandwidth.php
Runtime Notice: Declaration of UIUserList::getUserUI() should be compatible with Content::getUserUI($subclass_user_interface = NULL) in /var/www/html/classes/Content/UIUserList/UIUserList.php
Runtime Notice: Declaration of NodeGroup::freeObject() should be compatible with HotspotGraphElement::freeObject($id, $type) in /var/www/html/classes/NodeGroup.php
Runtime Notice: Declaration of NodeGroup::createNewObject() should be compatible with HotspotGraphElement::createNewObject($element_id, $element_type, $parent_element = NULL) in /var/www/html/classes/NodeGroup.php
Runtime Notice: Declaration of Network::freeObject() should be compatible with HotspotGraphElement::freeObject($id, $type) in /var/www/html/classes/Network.php on line 71
Runtime Notice: Declaration of Network::createNewObject() should be compatible with HotspotGraphElement::createNewObject($element_id, $element_type, $parent_element = NULL) in /var/www/html/classes/Network.php on line 71
Notice: Use of undefined constant CONF_DATABASE_NAME - assumed 'CONF_DATABASE_NAME' in /var/www/html/classes/AbstractDb.php on line 91
Notice: Use of undefined constant CONF_DATABASE_HOST - assumed 'CONF_DATABASE_HOST' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_PORT - assumed 'CONF_DATABASE_PORT' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_USER - assumed 'CONF_DATABASE_USER' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_PASSWORD - assumed 'CONF_DATABASE_PASSWORD' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_HOST - assumed 'CONF_DATABASE_HOST' in /var/www/html/classes/AbstractDb.php on line 103
Notice: Use of undefined constant CONF_DATABASE_PORT - assumed 'CONF_DATABASE_PORT' in /var/www/html/classes/AbstractDb.php on line 103
Notice: Use of undefined constant CONF_DATABASE_USER - assumed 'CONF_DATABASE_USER' in /var/www/html/classes/AbstractDb.php on line 103
Notice: Use of undefined constant NODE_PUBLIC_STATS_DIR - assumed 'NODE_PUBLIC_STATS_DIR' in /var/www/html/include/path_defines_url_content.php on line 151
Notice: Use of undefined constant CONF_DATABASE_NAME - assumed 'CONF_DATABASE_NAME' in /var/www/html/classes/AbstractDb.php on line 91
Notice: Use of undefined constant CONF_DATABASE_HOST - assumed 'CONF_DATABASE_HOST' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_PORT - assumed 'CONF_DATABASE_PORT' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_USER - assumed 'CONF_DATABASE_USER' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_PASSWORD - assumed 'CONF_DATABASE_PASSWORD' in /var/www/html/classes/AbstractDb.php on line 94
Notice: Use of undefined constant CONF_DATABASE_HOST - assumed 'CONF_DATABASE_HOST' in /var/www/html/classes/AbstractDb.php on line 103
Notice: Use of undefined constant CONF_DATABASE_PORT - assumed 'CONF_DATABASE_PORT' in /var/www/html/classes/AbstractDb.php on line 103
Notice: Use of undefined constant CONF_DATABASE_USER - assumed 'CONF_DATABASE_USER' in /var/www/html/classes/AbstractDb.php on line 103

These runtime notices are due to the subclasses having different method signatures from their parent classes. Disabling the runtime notices on PHP 5.4 seemed to work, but on 5.6 don't.

Unfortunately I can't downgrade PHP. So is there any chance to get these classes updated for PHP 5.4+?

How to support passpoints using WiFidog ?

Hello,
Scenario :- There are 2 hotspots in a network.

  1. User is moving from hotspot1 to hotspot2.
  2. User has signed up on hotspot1, when he connects to hotspot2,
    how can we authenticate the user on hotspot2 also ?

Database wifidog exists and is at schema version 62. The required schema version is 71.

Database wifidog exists and is at schema version 62. The required schema version is 71. Triggering database schema upgrade ;* @author Max Horváth ;* @copyright 2004-2006 Benoit Grégoire, Technologies Coeus inc.;* @copyright 2005-2006 Max Horváth, Horvath Web Consulting;* @Version Subversion $Id$;* @link http://www.wifidog.org/;*/;;/;* In case this is the local.config.php you should remove the next lines.;*/;;if (file_exists(dirname(FILE) . "/local.config.php")) {;// Use a local copy of the configuration if found instead of the distro's.;require dirname(FILE) . "/local.config.php";;} else {;;/;* In case this is the local.config.php stop removing the

first time password

hello,

trying setup with install.php but cant locate dog_cookie.txt in /tmp/ folder, as it is empty, so I cant use password to proceed.

I assume that the /tmp/ should be in my server's /var/www/html/wifidog-auth/wifidog folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.