1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-28 03:22:38 +01:00

Merge branch 'MDL-77287-401' of https://github.com/snake/moodle into MOODLE_401_STABLE

This commit is contained in:
Paul Holden 2023-02-20 09:55:09 +00:00
commit bc30c47ad7
2 changed files with 6 additions and 3 deletions
admin/tool/oauth2
classes/form
tests/behat

@ -244,7 +244,6 @@ class issuer extends persistent {
* @return array of additional errors, or overridden errors. * @return array of additional errors, or overridden errors.
*/ */
protected function extra_validation($data, $files, array &$errors) { protected function extra_validation($data, $files, array &$errors) {
$errors = [];
if ($data->showonloginpage != \core\oauth2\issuer::SERVICEONLY) { if ($data->showonloginpage != \core\oauth2\issuer::SERVICEONLY) {
if (!strlen(trim($data->loginscopes))) { if (!strlen(trim($data->loginscopes))) {
$errors['loginscopes'] = get_string('required'); $errors['loginscopes'] = get_string('required');

@ -218,9 +218,13 @@ Feature: Basic OAuth2 functionality
| Name | Invalid custom service | | Name | Invalid custom service |
| Client ID | thisistheclientid | | Client ID | thisistheclientid |
| Client secret | supersecret | | Client secret | supersecret |
| Service base URL | https://dc.imsglobal.org/ | | Service base URL | http://dc.imsglobal.org/ |
When I press "Save changes" When I press "Save changes"
Then I should see "Could not discover end points for identity issuer: Invalid custom service" Then I should see "For security reasons only https connections are allowed, sorry"
And I set the following fields to these values:
| Service base URL | https://dc.imsglobal.org/ |
And I press "Save changes"
And I should see "Could not discover end points for identity issuer: Invalid custom service"
And I should see "URL: https://dc.imsglobal.org/.well-known/openid-configuration" And I should see "URL: https://dc.imsglobal.org/.well-known/openid-configuration"
And "Allow services" "icon" should exist in the "Invalid custom service" "table_row" And "Allow services" "icon" should exist in the "Invalid custom service" "table_row"
And "Do not allow login" "icon" should exist in the "Invalid custom service" "table_row" And "Do not allow login" "icon" should exist in the "Invalid custom service" "table_row"