Problem/Motivation

While plugins already can provide their own settings within their buildConfigurationForm method, they are not able to directly address form validation or process the settings within the configuration form's submit handler. This currently requires the use of a settings form alter hook, as the provided validate and submit methods of the OpenIDConnectClientBase class are merely unused dummies.

Proposed resolution

Invoke the validateConfigurationForm and submitConfigurationForm of all client plugin classes within the OpenID Connect SettingsForm's validateForm and submitForm methods.

Remaining tasks

Community review.

User interface changes

None.

API changes

None. All methods are already present. They are just not in use. Modules that add submit/validate handlers using a settings form alter hook (e.g. Keycloak) can then rely on these methods.

Data model changes

None.

Comments

Mario Steinitz created an issue. See original summary.

mario steinitz’s picture

Assigned: mario steinitz » Unassigned
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new7.28 KB

Attached a patch that adds invokation of the client plugin's validate and submit handlers to the admin settings form.

mario steinitz’s picture

StatusFileSize
new9.69 KB

Added missing SubformState::createForSubform() to SettingsForm::buildForm() and tested the patch in conjunction with custom plugin settings and setting preprocessing through the plugin (saving still takes place within the form submit handler).

Looks good to me now.

  • Mario Steinitz committed 083e59f on 8.x-1.x
    Issue #2961251 by Mario Steinitz: Allow client plugins to provide form...
  • Mario Steinitz committed c0bbe5c on 8.x-1.x
    Issue #2961251: Add validation for default configuration fields to...
mario steinitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.