mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
webservice MDL-17135 do not check if ws authentication plugin is enabled for the ws token method, it is only useful for username/password method.
This commit is contained in:
parent
83d50b79cd
commit
1839e2f094
@ -129,17 +129,18 @@ abstract class webservice_server implements webservice_server_interface {
|
||||
throw new coding_exception('Cookies must be disabled in WS servers!');
|
||||
}
|
||||
|
||||
if (!is_enabled_auth('webservice')) {
|
||||
throw new webservice_access_exception(get_string('wsauthnotenabled', 'webservice'));
|
||||
}
|
||||
|
||||
if (!$auth = get_auth_plugin('webservice')) {
|
||||
throw new webservice_access_exception(get_string('wsauthmissing', 'webservice'));
|
||||
}
|
||||
|
||||
// NOTE: the exception details are here for debugging only, it is controlled via the $CFG->degug
|
||||
|
||||
if ($this->simple) {
|
||||
|
||||
//we check that authentication plugin is enabled
|
||||
//it is only required by simple authentication
|
||||
if (!is_enabled_auth('webservice')) {
|
||||
throw new webservice_access_exception(get_string('wsauthnotenabled', 'webservice'));
|
||||
}
|
||||
|
||||
if (!$auth = get_auth_plugin('webservice')) {
|
||||
throw new webservice_access_exception(get_string('wsauthmissing', 'webservice'));
|
||||
}
|
||||
|
||||
$this->restricted_context = get_context_instance(CONTEXT_SYSTEM);
|
||||
|
||||
if (!$this->username) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user