mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-77287-master' of https://github.com/snake/moodle
This commit is contained in:
commit
63e5431b25
2 changed files with 6 additions and 3 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue