75 CustomAuthenticationConfiguration customAuthenticationConfig =
new CustomAuthenticationConfiguration();
76 customAuthenticationConfig.setName(oneConf.getName());
77 customAuthenticationConfig.setLevel(oneConf.getLevel());
78 customAuthenticationConfig.setPriority(oneConf.getPriority());
79 customAuthenticationConfig.setEnabled(oneConf.getEnabled());
80 customAuthenticationConfig.setVersion(oneConf.getVersion());
82 for (CustomProperty customProperty : oneConf.getFields()) {
83 if ((customProperty.getValues() == null) || (customProperty.getValues().size() == 0)) {
87 String attrName = StringHelper.toLowerCase(customProperty.getName());
89 if (StringHelper.isEmpty(attrName)) {
93 String value = customProperty.getValues().get(0);
97 SimpleCustomProperty
property =
new SimpleCustomProperty(key, value);
98 customAuthenticationConfig.getCustomAuthenticationAttributes().add(property);
100 customAuthenticationConfig.setCustomAuthenticationScript(value);
102 if (StringHelper.isNotEmpty(value)) {
103 AuthenticationScriptUsageType authenticationScriptUsageType = AuthenticationScriptUsageType.getByValue(value);
104 customAuthenticationConfig.setUsageType(authenticationScriptUsageType);
109 return customAuthenticationConfig;
static final String CUSTOM_AUTHENTICATION_SCRIPT_PROPERTY_NAME
Definition: LdapCustomAuthenticationConfigurationService.java:38
static final String CUSTOM_AUTHENTICATION_SCRIPT_USAGE_TYPE
Definition: LdapCustomAuthenticationConfigurationService.java:40
static final String CUSTOM_AUTHENTICATION_PROPERTY_PREFIX
Definition: LdapCustomAuthenticationConfigurationService.java:39