27 Commits

Author SHA1 Message Date
Sara Arjona
089e918033 MDL-65809 upgrade: remove upgrade_fix_config_auth_plugin_names
These functions were used only by deleted upgrade steps
so it's safe to proceed with straight deletion, considering
them internal. Deletion has been documented in corresponding
upgrade.txt files:

- upgrade_fix_config_auth_plugin_names()
- upgrade_fix_config_auth_plugin_defaults()
2019-12-20 12:20:43 +01:00
Shamim Rezaie
206ec32890 MDL-59298 auth: Added get_password_change_info to auth plugins 2019-04-08 18:43:22 +10:00
Damyon Wiese
6dfe428363 MDL-63183 auth: Login protection
CSRF protection for the login form. The authenticate_user_login function was
extended to validate the token (in \core\session\manager) but by default it
does not perform the extra validation. Existing uses of this function from
auth plugins and features like "change password" will continue to work without
changes. New config value $CFG->disablelogintoken can bypass this check.
2018-11-07 00:14:48 +01:00
Marina Glancy
1727c939ba MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:55 +08:00
Mark Nelson
55595bcfcb MDL-40613 auth: added note in upgrade.txt 2017-12-19 14:13:35 +08:00
David Mudrák
2b948c204a MDL-58793 auth: Do not report migrated settings as new ones on upgrade
As a result of fixing the auth plugins config storage in MDL-12689, many
settings would be falsely reported as new ones by
admin/upgradesettings.php. We do not want to confuse admins so we try to
reduce the bewilderment by pre-populating the config_plugins table with
default values. This should be done only for disabled auth methods. The
enabled methods have their settings already stored, so reporting actual
new settings for them is valid.
2017-05-08 11:51:55 +02:00
David Mudrák
31bd102316 MDL-58692 auth: Improve the migration of auth setting names
Some auth plugins used to have a mix of the legacy style of plugin names
in config_plugins table (such as 'auth/mnet') and the new correct
style (such as 'auth_mnet'). Attempting to rename the setting plugin via
low level SQL UPDATE could lead to duplicate key violation.

The patch introduces a new helper function to safely migrate the old
settings to the new ones, eventually informing the admin about the
values mismatch.
2017-05-03 12:02:43 +02:00
David Mudrák
1cb5c7b31f MDL-58631 auth: Clarify documentation of changes in loginpage_idp_list()
This should clarify the new 'iconurl' key returned by the auth plugin's
loginpage_idp_list() method.
2017-04-18 17:00:40 +02:00
Stephen Bourget
037273d87e MDL-12689: convert auth plugins to use settings.php 2017-04-03 10:50:09 -04:00
Juan Leyva
813320fbb6 MDL-57102 auth: Add new signup_is_enabled function
And apply the function in:
- login/signup.php
- blocks/login/block_login.php
2016-11-23 19:35:08 +00:00
Juan Leyva
d6a25bc49a MDL-56739 auth: Support custom confirmation URL 2016-11-10 09:35:21 +00:00
Dan Poltawski
4d27d62d08 Merge branch 'wip-MDL-55927-master' of git://github.com/abgreeve/moodle 2016-11-02 14:00:29 +00:00
Adrian Greeve
159c2c91be MDL-55927 auth_radius: Move to third party plugin. 2016-10-28 14:35:54 +08:00
Dan Poltawski
876fc28255 MDL-56082 auth: minor tweak to login block idp links
No longer set the return url to $SESSION->wantsurl, it doens't make
sense in this context, as the user is probably on the page they want.

Also add a note about this functionality to auth/ugrade.txt
2016-10-18 17:19:03 +01:00
Jakob
cffd0fa138 MDL-53306 auth: Add hook for auth plugins to access user object.
Add a hook for auth plugins to be able to modify or check a user, before
raising any authentication errors.

The auth plugin needs to add a public function like this:

/**
 * Pre user_login hook.
 * This method is called from authenticate_user_login() right after the user
 * object is generated. This gives the auth plugins an option to make adjustments
 * before the verification process starts.
 *
 * @param object $user user object, later used for $USER
*/
public function pre_user_login_hook(&$user) {
    // Override if needed.
}
2016-05-30 11:57:03 -07:00
Marina Glancy
0f7f30021a MDL-51217 auth: check if recaptcha enabled for current plugin 2015-09-16 15:30:04 +08:00
Eloy Lafuente (stronk7)
31f5ee4a34 MDL-48887 auth: added new hook to upgrade notes. 2015-04-02 11:08:20 +02:00
Petr Skoda
1d658535b6 MDL-47830 auth: Add pw rotation restrictions 2014-12-01 08:53:52 +13:00
Petr Skoda
f720c2c060 MDL-48282 Standardise update of user->firstaccess 2014-11-21 09:25:57 +13:00
Adrian Greeve
1899519c6b MDL-39888 mnet: Removed tab and links to the log report.
The link would include parameters which generates warnings
on the log report page.
2014-08-26 15:11:56 +08:00
Petr Skoda
c6b5f18d06 MDL-46561 session: use full session validation in \core\session\manager::session_exists() 2014-08-07 08:59:24 +12:00
Ankit Agarwal
963cdce4e2 MDL-42097 auth: Auth plugins must check passwordurl before returning it 2013-12-03 14:17:42 +08:00
Mark Nelson
b573724a03 MDL-27953 auth: documented the newly introduced function can_be_manually_set() in upgrade.txt 2013-08-06 15:46:14 +12:00
Michael Aherne
57d38adc58 MDL-34685 auth Allow auth plugins to override user signup form 2012-08-07 09:55:02 +08:00
Petr Skoda
a2dd56d23e MDL-8249 add role naming related info to upgrade.txt files 2012-07-06 08:22:51 +02:00
Petr Skoda
ee362526f8 MDL-29897 Update upgrade.txt files 2011-11-03 08:11:55 +01:00
Petr Skoda
e922fe23b6 MDL-29602 accesslib improvements
Refactoring and improvements of the accesslib.php library including prevention of access for not-logged-in users when forcelogin enabled, improved context caching, OOP refactoring of contexts, fixed context loading, deduplication of role definitions in user sessions, installation improvements, decoupling of enrolment checking from capability loading, added detection of deleted and non-existent users in has_capability(), new function accesslib test, auth and enrol upgrade notes.

More details are available in tracker subtasks.
2011-10-16 14:05:18 +02:00