From 3358c1e9428e02e72dc197134a1fb6103c8e5339 Mon Sep 17 00:00:00 2001 From: Dmitrii Metelkin Date: Fri, 19 Aug 2016 16:46:19 +1000 Subject: [PATCH] Update documentation --- README.md | 19 +++++++++---------- lang/en/auth_userkey.php | 5 +++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 29a741c..87d4228 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,12 @@ URL to be log in to Moodle without typing username and password. Using ----- 1. Install the plugin as usual. -2. Enable and configure just installed plugin. Set required Mapping field, User key life time, -User key life time and Redirect after logout. -3. Configure Moodle web services as described here http://docs.moodle.org/en/Web_services -4. Add function "auth_userkey_request_login_url" to your enabled web service. -5. Configure your external application to make a web call to get login URL. -6. Redirect your users to this URL to be logged in to Moodle. - +2. Enable and configure just installed plugin. Set required Mapping field, User key life time, IP restriction and Logout redirect URL. +3. Enable web service advance feature (Admin > Advanced features), more info http://docs.moodle.org/en/Web_services +4. Enable one of the supported protocols (Admin > Plugins > Web services > Manage protocols) +5. Create a token for a specific user and for the service 'Request login URL Service' (Admin > Plugins > Web services > Manage tokens) +6. Configure your external application to make a web call to get login URL. +7. Redirect your users to this URL to be logged in to Moodle. Configuration ------------- @@ -75,10 +74,10 @@ get an error. **IP restriction** -If this setting is set to yes, then user have to use the same remote IP address to generate a user key (make -a web call) as well as then log in using this key. If IP address is different a user will get an error. +If this setting is set to yes, then your web application has to provie user's ip address to generate a user key. Then +the user should have provided ip when using this key. If ip address is different a user will get an error. -**Redirect after logout** +**Logout redirect URL** You can set URL to redirect users after they logged out from Moodle. For example you can redirect them to logout script of your web application to log users out from it as well. This setting is optional. diff --git a/lang/en/auth_userkey.php b/lang/en/auth_userkey.php index 8a3b749..798a0f2 100644 --- a/lang/en/auth_userkey.php +++ b/lang/en/auth_userkey.php @@ -23,11 +23,12 @@ */ $string['pluginname'] = 'User key authentication'; -$string['auth_userkeydescription'] = ''; // TODO: create descripton. +$string['auth_userkeydescription'] = 'Log in to Moodle using one time user key.'; $string['mappingfield'] = 'Mapping field'; $string['mappingfield_desc'] = 'This user field will be used to find relevant user in the LMS.'; $string['iprestriction'] = 'IP restriction'; -$string['iprestriction_desc'] = 'If enabled, a user should use the same remote ip to get login URL and logging to to LMS.'; +$string['iprestriction_desc'] = 'If enabled, a web call has to contain "ip" parameter when requesting login URL. +A user has to have provided IP to be able to use a key to login to LMS.'; $string['keylifetime'] = 'User key life time'; $string['keylifetime_desc'] = 'Life time in seconds of the each user login key.'; $string['incorrectkeylifetime'] = 'User key life time should be a number';