108 {
110 $form->setTitle($this->
lng->txt(
'auth_oidc_settings_title'));
111 $form->setFormAction($this->
ctrl->getFormAction($this));
112
113
115 $this->
lng->txt(
'auth_oidc_settings_activation'),
116 'activation'
117 );
118 $activation->setChecked($this->
settings->getActive());
119 $form->addItem($activation);
120
121
123 $this->
lng->txt(
'auth_oidc_settings_provider'),
124 'provider'
125 );
129
131 $this->
lng->txt(
'auth_oidc_settings_client_id'),
132 'client_id'
133 );
137
138
140 $this->
lng->txt(
'auth_oidc_settings_secret'),
141 'secret'
142 );
143 $secret->setSkipSyntaxCheck(
true);
146 if ($this->
settings->getSecret() !==
'') {
148 }
150
152 $this->
lng->txt(
'auth_oidc_settings_additional_scopes'),
153 "default_scope"
154 );
156 $default_scope->setDisabled(true);
157 $form->addItem($default_scope);
158
160 "",
161 "scopes"
162 );
164 $scopeValues = $this->
settings->getAdditionalScopes();
165 if (isset($scopeValues[0])) {
166 $scopes->setValue($scopeValues[0]);
167 }
168 $scopes->setMultiValues($scopeValues);
170
171
172
174 $this->
lng->txt(
'auth_oidc_settings_validate_scopes'),
175 'validate_scopes'
176 );
177 $validation_options->setValue((
string) $this->
settings->getValidateScopes());
178 $form->addItem($validation_options);
179
181 $this->
lng->txt(
'auth_oidc_settings_validate_scope_default'),
183 );
184
185 $validation_options->addOption($base_valid_url_option);
186
188 '',
189 'custom_discovery_url'
190 );
191
193 $this->
lng->txt(
'auth_oidc_settings_validate_scope_custom'),
195 );
196 $validation_options->addOption($custom_valid_url_option);
197 $custom_validation_url->setValue($this->
settings->getCustomDiscoveryUrl() ??
'');
198 $custom_validation_url->setMaxLength(120);
199 $custom_validation_url->setInfo($this->
lng->txt(
'auth_oidc_settings_discovery_url'));
200 $custom_valid_url_option->addSubItem($custom_validation_url);
202 $this->
lng->txt(
'auth_oidc_settings_validate_scope_none'),
204 );
205 $validation_options->addOption($no_validation_option);
206
207
209 $this->
lng->txt(
'auth_oidc_settings_le'),
210 'le'
211 );
212 $login_element->setRequired(true);
213 $login_element->setValue((
string) $this->
settings->getLoginElementType());
214 $form->addItem($login_element);
215
216
218 $this->
lng->txt(
'auth_oidc_settings_txt'),
220 );
221 $login_element->addOption($text_option);
222
223
225 '',
226 'le_text'
227 );
228 $text->setValue($this->
settings->getLoginElemenText());
229 $text->setMaxLength(120);
230 $text->setInfo($this->
lng->txt(
'auth_oidc_settings_txt_val_info'));
231 $text_option->addSubItem($text);
232
233
235 $this->
lng->txt(
'auth_oidc_settings_img'),
237 );
238 $login_element->addOption($img_option);
239
241 '',
242 'le_img'
243 );
244 $image->setAllowDeletion(false);
245
246 if ($this->
settings->hasImageFile()) {
247 $image->setImage($this->
settings->getImageFilePath());
248 }
249 $image->setInfo($this->
lng->txt(
'auth_oidc_settings_img_file_info'));
250 $img_option->addSubItem($image);
251
252
254 $this->
lng->txt(
'auth_oidc_settings_login_options'),
255 'login_prompt'
256 );
257 $login_options->setValue((
string) $this->
settings->getLoginPromptType());
258
259
261 $this->
lng->txt(
'auth_oidc_settings_login_option_enforce'),
263 );
264 $enforce->setInfo($this->
lng->txt(
'auth_oidc_settings_login_option_enforce_info'));
265 $login_options->addOption($enforce);
266
267
269 $this->
lng->txt(
'auth_oidc_settings_login_option_default'),
271 );
272 $default->setInfo($this->
lng->txt(
'auth_oidc_settings_login_option_default_info'));
273 $login_options->addOption($default);
274
275 $form->addItem($login_options);
276
277
279 $this->
lng->txt(
'auth_oidc_settings_logout_scope'),
280 'logout_scope'
281 );
282 $logout_scope->setValue((
string) $this->
settings->getLogoutScope());
283
284
286 $this->
lng->txt(
'auth_oidc_settings_logout_scope_global'),
288 );
289 $global_scope->setInfo($this->
lng->txt(
'auth_oidc_settings_logout_scope_global_info'));
290 $logout_scope->addOption($global_scope);
291
292
294 $this->
lng->txt(
'auth_oidc_settings_logout_scope_local'),
296 );
297 $ilias_scope->setInfo($this->
lng->txt(
'auth_oidc_settings_logout_scope_local_info'));
298 $logout_scope->addOption($ilias_scope);
299
300 $form->addItem($logout_scope);
301
303 $this->
lng->txt(
'auth_oidc_settings_custom_session_duration_type'),
304 'custom_session'
305 );
306 $use_custom_session->setOptionTitle(
307 $this->
lng->txt(
'auth_oidc_settings_custom_session_duration_option')
308 );
309 $use_custom_session->setChecked($this->
settings->isCustomSession());
310 $form->addItem($use_custom_session);
311
312
314 $this->
lng->txt(
'auth_oidc_settings_session_duration'),
315 'session_duration'
316 );
322 $use_custom_session->addSubItem(
$session);
323
325
326 $form->addCommandButton(
'saveSettings', $this->
lng->txt(
'save'));
327 }
328
329
331 $user_sync->setTitle($this->
lng->txt(
'auth_oidc_settings_section_user_sync'));
332 $form->addItem($user_sync);
333
335 $this->
lng->txt(
'auth_oidc_settings_user_sync'),
336 'sync'
337 );
338 $sync->setChecked($this->
settings->isSyncAllowed());
339 $sync->setInfo($this->
lng->txt(
'auth_oidc_settings_user_sync_info'));
340 $sync->setValue("1");
341 $form->addItem($sync);
342
344 $this->
lng->txt(
'auth_oidc_settings_default_role'),
345 'role'
346 );
347 $roles->setValue($this->
settings->getRole());
348 $roles->setInfo($this->
lng->txt(
'auth_oidc_settings_default_role_info'));
350 $roles->setRequired(true);
351 $sync->addSubItem($roles);
352
354 $this->
lng->txt(
'auth_oidc_settings_user_attr'),
355 'username'
356 );
357 $user_attr->setValue($this->
settings->getUidField());
358 $user_attr->setRequired(true);
359 $form->addItem($user_attr);
360
361 return $form;
362 }
const LOGIN_ELEMENT_TYPE_IMG
const URL_VALIDATION_PROVIDER
const URL_VALIDATION_CUSTOM
const LOGOUT_SCOPE_GLOBAL
const URL_VALIDATION_NONE
const LOGIN_ELEMENT_TYPE_TXT
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...