mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-71017 oath2: configuration check fix and return types
This commit is contained in:
parent
5a6f05c605
commit
57a444d31f
4 changed files with 10 additions and 9 deletions
|
@ -102,7 +102,7 @@ class renderer extends plugin_renderer_base {
|
|||
// Internal services issuer.
|
||||
if ((int)$issuer->get('showonloginpage') == issuer::LOGINONLY) {
|
||||
$serviceissuer = $this->pix_icon('no', get_string('issuersservicesnotallow', 'tool_oauth2'), 'tool_oauth2');
|
||||
} else if ($issuer->get('id') && $issuer->is_configured() && !empty($issuer->get_endpoint_url('userinfo'))) {
|
||||
} else if ($issuer->get('id') && $issuer->is_configured()) {
|
||||
$serviceissuer = $this->pix_icon('yes', get_string('issuersservicesallow', 'tool_oauth2'), 'tool_oauth2');
|
||||
} else {
|
||||
$serviceissuer = $this->pix_icon('notconfigured', get_string('notconfigured', 'tool_oauth2'), 'tool_oauth2');
|
||||
|
|
|
@ -152,7 +152,7 @@ Feature: Basic OAuth2 functionality
|
|||
When I press "Save changes"
|
||||
Then I should see "Changes saved"
|
||||
And I should see "OpenBadges"
|
||||
And "Not configured" "icon" should exist in the "OpenBadges" "table_row"
|
||||
And "Allow services" "icon" should exist in the "OpenBadges" "table_row"
|
||||
And "Do not allow login" "icon" should exist in the "OpenBadges" "table_row"
|
||||
And "Service discovery successful" "icon" should exist in the "OpenBadges" "table_row"
|
||||
And the "src" attribute of "table.admintable th img" "css_element" should contain "IMS-Global-Logo.png"
|
||||
|
@ -222,8 +222,8 @@ Feature: Basic OAuth2 functionality
|
|||
When I press "Save changes"
|
||||
Then 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"
|
||||
And "Not configured" "icon" should exist in the "Invalid custom service" "table_row"
|
||||
And I should see "-" in the "Invalid custom service" "table_row"
|
||||
And I click on "Configure endpoints" "link" in the "Invalid custom service" "table_row"
|
||||
And I should not see "discovery_endpoint"
|
||||
|
@ -263,8 +263,8 @@ Feature: Basic OAuth2 functionality
|
|||
When I press "Save changes"
|
||||
And I should see "Changes saved"
|
||||
And I should see "Empty custom service"
|
||||
And "Allow services" "icon" should exist in the "Empty custom service" "table_row"
|
||||
And "Do not allow login" "icon" should exist in the "Empty custom service" "table_row"
|
||||
And "Not configured" "icon" should exist in the "Empty custom service" "table_row"
|
||||
And I should see "-" in the "Empty custom service" "table_row"
|
||||
And I click on "Configure endpoints" "link" in the "Empty custom service" "table_row"
|
||||
And I should not see "discovery_endpoint"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue