public function OpenidConnectWindowsAadClient::settingsForm in OpenID Connect Microsoft Azure Active Directory client 7
Overrides OpenIDConnectClientBase::settingsForm().
Overrides OpenIDConnectClientBase::settingsForm
File
- plugins/
openid_connect_client/ windows_aad/ OpenidConnectWindowsAadClient.class.php, line 17 - OpenID Connect client for Windows Azure AD.
Class
- OpenidConnectWindowsAadClient
- Class OpenidConnectWindowsAadClient adds the client to OpenID Connect.
Code
public function settingsForm() {
$form = parent::settingsForm();
$default_site = 'https://login.windows.net/[tenant]';
$form['authorization_endpoint_wa'] = array(
'#title' => t('Authorization endpoint'),
'#type' => 'textfield',
'#default_value' => $this
->getSetting('authorization_endpoint_wa', $default_site . '/oauth2/authorize'),
);
$form['token_endpoint_wa'] = array(
'#title' => t('Token endpoint'),
'#type' => 'textfield',
'#default_value' => $this
->getSetting('token_endpoint_wa', $default_site . '/oauth2/token'),
);
$form['userinfo_endpoint_wa'] = array(
'#title' => t('UserInfo endpoint'),
'#type' => 'textfield',
'#default_value' => $this
->getSetting('userinfo_endpoint_wa', $default_site . '/openid/userinfo'),
);
$form['userinfo_graph_api_wa'] = array(
'#title' => t('Use Graph API for user info'),
'#type' => 'checkbox',
'#default_value' => $this
->getSetting('userinfo_graph_api_wa'),
'#description' => t('This option will omit the Userinfo endpoint and will use the Graph API ro retrieve the userinfo.'),
);
$form['userinfo_graph_api_use_other_mails'] = array(
'#title' => t('Use Graph API otherMails property for email address'),
'#type' => 'checkbox',
'#default_value' => $this
->getSetting('userinfo_graph_api_use_other_mails'),
'#description' => t('Find the first occurrence of an email address in the Graph otherMails property and use this as email address.'),
);
$form['userinfo_update_email'] = array(
'#title' => t('Update email address in user profile'),
'#type' => 'checkbox',
'#default_value' => $this
->getSetting('userinfo_update_email'),
'#description' => t('If email address has been changed for existing user, save the new value to the user profile.'),
);
$form['hide_email_address_warning'] = array(
'#title' => t('Hide missing email address warning'),
'#type' => 'checkbox',
'#default_value' => $this
->getSetting('hide_email_address_warning'),
'#description' => t('By default, when email address is not found, a message will appear on the screen. This option hides that message (as it might be confusing for end users).'),
);
return $form;
}