MDL-58400 tool_mobile: Return enabled identity providers
Via this public Ajax Web Service we return the list of identity providers in a site.
This commit is contained in:
@@ -153,6 +153,14 @@ class api {
|
||||
$settings['compactlogourl'] = $compactlogourl->out(false);
|
||||
}
|
||||
|
||||
// Identity providers.
|
||||
$authsequence = get_enabled_auth_plugins(true);
|
||||
$identityproviders = \auth_plugin_base::get_identity_providers($authsequence);
|
||||
$identityprovidersdata = \auth_plugin_base::prepare_identity_providers_for_output($identityproviders, $OUTPUT);
|
||||
if (!empty($identityprovidersdata)) {
|
||||
$settings['identityproviders'] = $identityprovidersdata;
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user