Commit graph

67 commits

Author SHA1 Message Date
9a87e9a496
refactor(auth): rename auth_userkey to auth_jwt
Some checks failed
ci / ci (push) Failing after 0s
Rebranded the auth_userkey plugin to auth_jwt, including changes to namespace, class names, and configuration settings to reflect the new jwt-based authentication mechanism. Updated copyright notices and contact information accordingly. This refactoring also includes the introduction of JWT token management using the Firebase JWT library, replacing the user quick keys.
2024-06-25 12:00:04 +02:00
Gurvan Giboire
87a5ef0110 fix upper case self 2023-12-06 08:07:24 -05:00
Gurvan Giboire
31d230dfe6 Fix unit tests in auth_plugin_test.php 2023-12-05 11:50:56 -05:00
Dmitrii Metelkin
4ab1cdc81d Update @covers annotation 2022-08-19 11:37:34 +10:00
Dmitrii Metelkin
a3014530ac Add @covers to all tests 2022-08-19 11:16:11 +10:00
Dmitrii Metelkin
55fdbb0ea0 Move test files 2022-08-19 10:57:38 +10:00
Dmitrii Metelkin
d8cd368159 Remove whitespace 2022-08-19 10:38:16 +10:00
Dmitrii Metelkin
b2d2adad55 Fix doc issues 2022-08-19 10:26:23 +10:00
Dmitrii Metelkin
78ec637899 Replace deprecated annotations 2022-08-19 10:08:02 +10:00
Dmitrii Metelkin
e8acf6b503 Fix declaration issue in unit tests 2022-06-03 16:44:24 +10:00
Anupama Dharmajan
f77ac17111 Fix codechecker errors 2022-01-17 08:44:01 +11:00
Dmitrii Metelkin
650c772707 Implement logout functionality 2020-05-08 22:57:13 +10:00
Dmitrii Metelkin
5a3cd5867f Fix test names of test functions 2020-05-08 19:39:22 +10:00
Dmitrii Metelkin
a9fa45b6d4 Remove empty line 2020-05-08 17:43:30 +10:00
Dmitrii Metelkin
de5cfdab7e Make sure that we check HTTP_CLIENT_IP first 2020-05-08 17:22:13 +10:00
Dmitrii Metelkin
9e9df72f52 Remove code duplication in tests 2020-05-08 17:20:28 +10:00
Dmitrii Metelkin
78bf6e94cd Move php unit tests to a folder 2020-05-08 16:53:54 +10:00
Dmitrii Metelkin
acb3ffd66d Don't rely on 2019-11-17 00:42:44 +11:00
Dmitrii Metelkin
1f8860f189 Add more tests 2019-11-17 00:19:48 +11:00
Dmitrii Metelkin
1be8efccb3 Logged out user if key is invalid 2019-11-16 23:59:16 +11:00
Dmitrii Metelkin
4a18dea34f Add test to cover fix when session is already exists 2019-11-16 23:19:14 +11:00
Dmitrii Metelkin
3733a74f05 Fix unit tests in later moodle versions 2019-11-16 22:47:18 +11:00
Dmitrii Metelkin
e6aeab9e85 Properly test confirmation 2018-05-02 10:06:36 +10:00
Stephen Hellauer
9d59b407e7
Test function check for correct confirmation 2018-05-01 07:44:36 -05:00
Andrew Hancox
4afc2055be Move settings into settings.php 2018-01-23 15:29:50 +00:00
Andrew Hancox
55b614e284 Remove calls to deprecated and removed function 2017-11-18 14:11:03 +00:00
Andrew Hancox
91c4be7df4 Fix issue matching IPs when whitelisting is enabled 2017-11-18 14:10:45 +00:00
Andrew Hancox
c2152c1c84 Refactored to make unit tests more robust 2017-10-20 18:04:56 +01:00
Andrew Hancox
833a25daf3 Fixed issues from code review 2017-10-03 18:03:02 +01:00
Andrew Hancox
bded162058 Add ability to white list IP addresses to ignore iprestrictions 2017-10-03 11:05:40 +01:00
Daniel Thee Roperto
596f2d72aa Issue #13 - Updated Travis and unit test.
- Added Moodle 32 and Moodle 33 to Travis.
- Updated Travis to not test mysql in every scenario
- Updated Travis to use Postgres 9.3 (required by Moodle 33+)
- Updated test_that_user_logged_in_and_redirected as newer Moodle defaults to different URL.
2017-05-15 11:52:08 +10:00
Andrew Hancox
9ec87b0e87 Removed dependency on Moodle 31 2017-04-03 09:32:35 +01:00
Andrew Hancox
c1624f7d05 Fixed codechecker issues 2017-04-03 09:15:38 +01:00
Andrew Hancox
805e22e8e0 Make additional user information optional unless creating a new user. 2017-03-31 13:37:46 +01:00
Andrew Hancox
b08d113e0c Add user provisioning. 2017-03-31 11:55:52 +01:00
Dmitrii Metelkin
35bec6b695 Use redirect function in user_login_userkey 2016-09-26 12:06:59 +10:00
Dmitrii Metelkin
1d380d8aed Refactor hooks and modify related tests 2016-09-26 11:48:14 +10:00
Dmitrii Metelkin
b7cd70f1ea Add ssourl validation 2016-09-26 10:45:40 +10:00
Matt Porritt
68f7634066 Add functionality to stop users from reaching the regular Moodle login page.
This function forces users who try to access Moodle directly to be redirected to the "SSO Host".  The functionality is enabled by setting a SSO redirect URl in the plugins admin settings
The forced redirect can be overridden by using the  query param "enrolkey_skipsso=on"
2016-09-26 09:51:52 +10:00
Dmitrii Metelkin
fd548ed7f5 Add reminder to write more tests 2016-08-27 16:17:21 +10:00
Dmitrii Metelkin
b93919bf5f Fix existing tests for core key manager class after changing the interface 2016-08-27 16:12:01 +10:00
Dmitrii Metelkin
401e9c9245 Update fake key manager in case to implement a new interface 2016-08-27 15:58:55 +10:00
Dmitrii Metelkin
6a85c04826 Fix #1 when redirecting to server root, not a moodle root 2016-08-27 14:50:53 +10:00
Dmitrii Metelkin
c84216c6f8 Fix ip restriction functionality 2016-08-19 16:01:08 +10:00
Dmitrii Metelkin
c6d7b60c67 Refactoring of tests/core_userkey_manager_test.php 2016-08-19 14:51:41 +10:00
Dmitrii Metelkin
ec059a2191 Add allowedips parameter to the core key manager 2016-08-19 14:47:40 +10:00
Dmitrii Metelkin
56d8c6cbe0 Fix a coding style issue 2016-08-19 13:10:11 +10:00
Dmitrii Metelkin
01949baf71 Add tests to support logoutpage_hook function 2016-08-19 12:06:13 +10:00
Dmitrii Metelkin
97cd90dcfe Add test to ceck if session marked as userkey session 2016-08-19 11:58:14 +10:00
Dmitrii Metelkin
b24d466649 Core userkey mamager doesn't care about existing of the user 2016-08-19 11:46:22 +10:00