Commit graph

27 commits

Author SHA1 Message Date
92ed01adc5
fix(jwt): log decode errors for better debugging
Some checks failed
ci / ci (push) Failing after 0s
Added error logging to capture JWT decode exceptions, aiding in pinpointing issues during authentication. This change improves troubleshooting and enhances the overall robustness of the JWT handling process.
2024-06-25 19:37:22 +02:00
5ae53cfc14
fix: update JWT decode method to use Key object
Some checks failed
ci / ci (push) Failing after 0s
Modified the JWT::decode method to use the Key object for decoding JWTs. This enhances security by explicitly specifying the algorithm used (HS256) and aligns with recent updates in the Firebase JWT library.
2024-06-25 19:33:02 +02:00
828af94032
fix(jwt): specify algorithm in encode and remove in decode
Some checks failed
ci / ci (push) Failing after 0s
Updated JWT::encode to explicitly use the HS256 algorithm for greater security. Removed redundant algorithm specification in JWT::decode for improved consistency and simplicity. This ensures the JWT operations follow expected standards and enhances maintainability.
2024-06-25 19:23:13 +02:00
863cb55ee3
fix: correct path to autoload file using __DIR__ constant
Some checks failed
ci / ci (push) Failing after 0s
Switched from relative path to using __DIR__ constant for requiring vendor/autoload.php. This ensures correct file inclusion regardless of the script's execution context, preventing potential loading issues.
2024-06-25 18:10:19 +02:00
9f7053ae3d
feat: integrate Firebase PHP-JWT library
Some checks failed
ci / ci (push) Failing after 0s
Added composer configuration files to manage dependencies. Installed and configured the Firebase PHP-JWT library to handle JWT encoding and decoding. This enhancement aims to streamline JWT operations within the project.

Also updated .gitignore to exclude Composer artifacts.
2024-06-25 18:04:16 +02:00
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
Dmitrii Metelkin
992ecf4c5f Fix minor CI complains 2022-08-19 11:18:20 +10:00
Dmitrii Metelkin
b2d2adad55 Fix doc issues 2022-08-19 10:26:23 +10:00
Dmitrii Metelkin
0341b05f99 Replace deprecated print_error calls 2022-08-19 10:06:19 +10:00
Anupama Dharmajan
f77ac17111 Fix codechecker errors 2022-01-17 08:44:01 +11:00
Dmitrii Metelkin
6ba819fd6e Add privacy API 2020-05-08 15:22:02 +10:00
Dmitrii Metelkin
0119c5b1b0 Add missing MOODLE_INTERNAL constants 2018-01-29 11:17:54 +11:00
Andrew Hancox
eea400f30f Reordered key checks 2017-12-12 11:53:21 +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
Andrew Hancox
c1624f7d05 Fixed codechecker issues 2017-04-03 09:15:38 +01:00
Dmitrii Metelkin
cbfbb5cb8a Get rid of unused global valiables 2016-08-27 16:06:35 +10:00
Dmitrii Metelkin
04a4f4f573 Update core key manager in case to implement a new interface 2016-08-27 15:58:39 +10:00
Dmitrii Metelkin
1c8f115935 Change user key manager interface to abstract key validation 2016-08-27 15:58:09 +10:00
Dmitrii Metelkin
ec059a2191 Add allowedips parameter to the core key manager 2016-08-19 14:47:40 +10:00
Dmitrii Metelkin
b24d466649 Core userkey mamager doesn't care about existing of the user 2016-08-19 11:46:22 +10:00
Dmitrii Metelkin
3e8c4138f0 Fix issue with keylifetime being string 2016-08-18 14:44:21 +10:00
Dmitrii Metelkin
3e7903b025 Fix some coding style issues 2016-08-17 12:21:12 +10:00
Dmitrii Metelkin
14829905b7 Add core_userkey_manager class 2016-08-16 17:49:43 +10:00
Dmitrii Metelkin
f05cdf3950 Add userkey_manager_interface 2016-08-16 17:48:45 +10:00