You are here

function openid_connect_login_form_submit in OpenID Connect / OAuth client 7

Form submit handler: Log in with an OpenID Connect login provider.

File

includes/openid_connect.forms.inc, line 28
Forms for OpenID Connect.

Code

function openid_connect_login_form_submit(&$form, &$form_state) {
  openid_connect_save_destination();
  $client_name = $form_state['triggering_element']['#name'];
  $client = openid_connect_get_client($client_name);
  $scopes = openid_connect_get_scopes();
  $_SESSION['openid_connect_op'] = 'login';
  $client
    ->authorize($scopes);
}