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:
Juan Leyva
2017-04-10 11:12:28 +08:00
committed by Jun Pataleta
parent 627ea5b10e
commit a67e3bda2e
3 changed files with 19 additions and 0 deletions
+8
View File
@@ -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;
}