Closed andrewhancox closed 7 years ago
I've dealt with the issues from your review.
Hey @andrewhancox! Some unit tests are failing on php5.6 and php7 Check out travis report please https://travis-ci.org/catalyst/moodle-auth_userkey/builds/282826163?utm_source=github_status&utm_medium=notification
The issue was with how I was detecting successful logins in my unit tests, not the PHP version. I have refactored to test in a way that will work across all PHP versions and they should now all pass... The one that is failing appears to be related to a core library in the master branch of Moodle now require PHP 7
This is an enhancement a client required:
The Wordpress site requesting the tokens was running on a server in the clients DMZ and the Moodle was hosted externally, the meant that for internal users the IP detected by Wordpress and to which the login token is locked is on an internal range so when the user then reaches Moodle via a public IP it looks like something dodgy is going on. This setting allows you to whitelist private address ranges etc. so that you can keep the IP restrictions in place for external users.
Now I've written all that I guess it's a bit of an edge case... I wrote unit tests though...