catalyst / moodle-auth_userkey

Log in to Moodle using one time user key based login URL. Auth plugin for organising simple SSO (single sign on) between moodle and your external web application.
https://moodle.org/plugins/auth_userkey
83 stars 53 forks source link

Add ability to white list IP addresses to ignore iprestrictions #18

Closed andrewhancox closed 7 years ago

andrewhancox commented 7 years ago

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...

andrewhancox commented 7 years ago

I've dealt with the issues from your review.

dmitriim commented 7 years ago

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

andrewhancox commented 7 years ago

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