Commit Graph

22 Commits

Author SHA1 Message Date
Tony Murray
e8cf6bb385 Fix API auth issues (#9185)
* Fix API auth issues
Api access page now creates tokens with the correct ID.
Correctly creates users for legacy user tokens.
Fix Ldap comparison
Laravel Util class to make code easier to access/read

* More api access page fixes

* fix style
2018-09-11 22:36:52 -05:00
Tony Murray
32a7c50189 Use Laravel authentication (#8702)
* Use Laravel for authentication
Support legacy auth methods
Always create DB entry for users (segregate by auth method)

Port api auth to Laravel

restrict poller errors to devices the user has access to

Run checks on every page load.  But set a 5 minute (configurable) timer.
Only run some checks if the user is an admin

Move toastr down a few pixels so it isn't as annoying.

Fix menu not loaded on laravel pages when twofactor is enabled for the system, but disabled for the user.
Add two missing menu entries in the laravel menu

Rewrite 2FA code
Simplify some and verify code before applying

Get http-auth working
Handle legacy $_SESSION differently.  Allows Auth::once(), etc to work.

* Fix tests and mysqli extension check

* remove duplicate Toastr messages

* Fix new items

* Rename 266.sql to 267.sql
2018-09-11 07:51:35 -05:00
Tony Murray
7250376104 refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth

* fix style

* add property annotations
2018-04-07 21:55:28 +01:00
mcq8
c9728a1f71 refactor: Refactored authorizers to classes (#7497)
* Refactored authorizers to classes

* Merge changes for #7335

* ! fix php 5.3 incompatibility

* Update ADAuthorizationAuthorizer.php

* Fix get_user -> getUser

* Rename AuthorizerFactory to Auth, fix interface missing functions

* Add phpdocs to all interface methods and normalize the names a bit.

* Re-work auth_test.php AD bind tests to work properly with the new class.
Reflection is not the nicest tool, but I think it is appropriate here.
Handle exceptions more nicely in auth_test.php

* Restore AD getUseList fix

Not sure how it got removed

* fix auth_test.php style
2017-11-18 10:33:03 +00:00
Neil Lathwood
107ad9cc1f fix: Update api-access page to use get_userlist() #6063 (#6082)
* fix: Update api-access page to use get_userlist() #6063

* updated token list

* updated to use on db call
2017-03-11 23:06:55 +00:00
Paul Heinrichs
097a827759 webui: display QR codes for API access (#5988)
* Generate qr code for api hash

Added qrcodejs ( https://github.com/davidshimjs/qrcodejs )

* Add head to modal window

* updated to use fontawesome
2017-02-23 22:19:22 -06:00
Tony Murray
8c639aa5a4 PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
2016-08-18 21:29:30 -05:00
Daniel Preussker
731e43bc66 Revert "[WIP] Sanity!" 2016-02-17 13:59:58 +00:00
f0o
c767a26732 more bulk sanity 2016-02-10 16:02:13 +00:00
Rosiak
fe537618b1 Minor Fixes 2015-09-16 18:17:04 +02:00
Arjit Chaudhary
8fd40f463f Various UI changes
Screenshots:
1. http://i.imgur.com/smjSuvc.png
2. http://i.imgur.com/0JFyKgE.png
2015-09-13 21:35:59 +05:30
Michael Newton
f77c712bfc changes needed to run under web server subdirectory 2015-08-11 14:54:05 -07:00
Neil Lathwood
945ca7f2ea Revert "changes needed to run under web server subdirectory" 2015-08-11 21:25:23 +01:00
Michael Newton
cc0f449fc9 changes needed to run under web server subdirectory 2015-08-07 11:10:43 -07:00
laf
d31798497f Fixed creating / deleting api keys in firefox 2015-07-24 14:50:09 +01:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
Neil Lathwood
2cb5d727b4 Updated to support a demo user 2015-02-16 23:45:28 +00:00
laf
2b9341e773 Updated disabled field to readonly as this stops submission of that field 2014-10-22 11:17:25 +01:00
laf
794c33e57b Updated create token to auto-generate token 2014-10-06 17:19:04 +01:00
laf
17a3689a78 Added the ability to create tokens 2014-09-30 00:17:55 +01:00
laf
5d83c30708 Started work on creating/updating tokens 2014-09-16 22:19:29 +01:00
laf
edec1c0c7d Initial API release 2014-09-16 22:19:28 +01:00