mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 17:40:26 +01:00
MDL-77287 tool_oauth2: fix issuer form validation
This ensures validation errors from the issuer persistent are seen.
This commit is contained in:
parent
eb84455a05
commit
efe9ac66be
@ -244,7 +244,6 @@ class issuer extends persistent {
|
||||
* @return array of additional errors, or overridden errors.
|
||||
*/
|
||||
protected function extra_validation($data, $files, array &$errors) {
|
||||
$errors = [];
|
||||
if ($data->showonloginpage != \core\oauth2\issuer::SERVICEONLY) {
|
||||
if (!strlen(trim($data->loginscopes))) {
|
||||
$errors['loginscopes'] = get_string('required');
|
||||
|
@ -218,9 +218,13 @@ Feature: Basic OAuth2 functionality
|
||||
| Name | Invalid custom service |
|
||||
| Client ID | thisistheclientid |
|
||||
| Client secret | supersecret |
|
||||
| Service base URL | https://dc.imsglobal.org/ |
|
||||
| Service base URL | http://dc.imsglobal.org/ |
|
||||
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 "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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user