You are here

public function SamlauthConfigureForm::submitForm in SAML Authentication 8

Same name and namespace in other branches
  1. 8.3 src/Form/SamlauthConfigureForm.php \Drupal\samlauth\Form\SamlauthConfigureForm::submitForm()
  2. 8.2 src/Form/SamlauthConfigureForm.php \Drupal\samlauth\Form\SamlauthConfigureForm::submitForm()
  3. 4.x src/Form/SamlauthConfigureForm.php \Drupal\samlauth\Form\SamlauthConfigureForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

src/Form/SamlauthConfigureForm.php, line 252
Contains Drupal\samlauth\Form\SamlauthConfigureForm.

Class

SamlauthConfigureForm
Class SamlauthConfigureForm.

Namespace

Drupal\samlauth\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('samlauth.authentication')
    ->set('drupal_saml_login', $form_state
    ->getValue('drupal_saml_login'))
    ->set('sp_entity_id', $form_state
    ->getValue('sp_entity_id'))
    ->set('sp_name_id_format', $form_state
    ->getValue('sp_name_id_format'))
    ->set('sp_x509_certificate', $form_state
    ->getValue('sp_x509_certificate'))
    ->set('sp_private_key', $form_state
    ->getValue('sp_private_key'))
    ->set('idp_entity_id', $form_state
    ->getValue('idp_entity_id'))
    ->set('idp_single_sign_on_service', $form_state
    ->getValue('idp_single_sign_on_service'))
    ->set('idp_single_log_out_service', $form_state
    ->getValue('idp_single_log_out_service'))
    ->set('idp_change_password_service', $form_state
    ->getValue('idp_change_password_service'))
    ->set('idp_x509_certificate', $form_state
    ->getValue('idp_x509_certificate'))
    ->set('unique_id_attribute', $form_state
    ->getValue('unique_id_attribute'))
    ->set('map_users', $form_state
    ->getValue('map_users'))
    ->set('map_users_email', $form_state
    ->getValue('map_users_email'))
    ->set('create_users', $form_state
    ->getValue('create_users'))
    ->set('user_name_attribute', $form_state
    ->getValue('user_name_attribute'))
    ->set('user_mail_attribute', $form_state
    ->getValue('user_mail_attribute'))
    ->set('security_authn_requests_sign', $form_state
    ->getValue('security_authn_requests_sign'))
    ->set('security_messages_sign', $form_state
    ->getValue('security_messages_signe'))
    ->set('security_name_id_sign', $form_state
    ->getValue('security_name_id_sign'))
    ->set('security_request_authn_context', $form_state
    ->getValue('security_request_authn_context'))
    ->save();
}