zoneminder/web/api/app/Controller
Isaac Connor 84492f29b1
Fix token auth sessions (#2676)
* If token is present do token based auth and do not do anything with session

* update HostController.  Use config constants, don't use sessions

* Remove Session from the components list

* spacing

* Remove Session from App Components list.

* Move APIEnabled check to the api from auth.php

* Rework auth.  login using username and password only occurs on login action now.  Including auth.php should not touch the session.  auth_hash logins no longer touch the session.  replace userLogin with a function called validateUser which matches the semantics of validateToken.

* remove debugging

* Add session storage if stateful query param is on, but only for LEGACY_API_AUTH

* fix mUser to username, etc.

* shuffle lines

* use  instead of session when generating auth hash.

* Add docs regarding the use of cookies and stateful query param

* Only open/close session if we are clearing a session var

* Use zm_session_start instead of session_start

* Should use zm_session_start instead of session_start

* document that zm_session_start should be called previously to session_regenerate_id

* Don't actually write out the session when generating auth hashes.  Means they should never actually persist.

* More backticking of SQL

* add .. to fix #2686

* Use material icons for sort because they look nicer

* fix typo

* have to add authhash to session on login

* restore username&password login for all urls

* fix

* fixes
2019-08-20 09:46:53 -04:00
..
Component API: Monitor and Event 'index' SQLi. Fixes #2099 2019-03-11 00:21:51 -07:00
AppController.php Fix token auth sessions (#2676) 2019-08-20 09:46:53 -04:00
ConfigsController.php Include values in /etc/zm files in viewByName 2018-06-25 15:43:01 -04:00
ControlsController.php Merged Angular UI branch API to master 2015-06-11 02:58:58 +00:00
EventsController.php add event file system path to API (#2639) 2019-06-16 11:59:23 -04:00
FramesController.php Moved the api to underneath the web directory 2014-04-29 20:41:04 +00:00
GroupsController.php Update permissions checking for Groups to not use session. Fixes #2353 2018-12-21 10:01:48 -05:00
HostController.php Fix token auth sessions (#2676) 2019-08-20 09:46:53 -04:00
LogsController.php Merged Angular UI branch API to master 2015-06-11 02:58:58 +00:00
MonitorsController.php Alarm api (#2665) 2019-07-17 20:38:58 -04:00
PagesController.php further merges from cakephp 2.10.8 2018-03-21 13:09:55 -04:00
ServersController.php fix_2167 (#2168) 2018-08-08 09:59:46 -04:00
StatesController.php We don't store all the permissions in the session anymore. We just use the global user object 2018-10-29 11:03:03 -04:00
StorageController.php Don't include related models in Storage index 2018-10-29 14:40:05 -04:00
UsersController.php add in User Model/Controller and rough in auth. 2015-06-30 11:27:17 -04:00
ZonePresetsController.php fix spacing/quotes/google code style 2018-07-24 16:41:09 -04:00
ZonesController.php more parentheses to make logic more clear 2019-03-20 14:26:35 -04:00