use of org.gluu.config.oxtrust.NameIdConfig in project oxTrust by GluuFederation.
the class ConfigureNameIdAction method init.
public String init() {
loadNameIds();
this.attributes = attributeService.getAllAttributes();
this.nameIdConfigs = new ArrayList<NameIdConfig>();
AttributeResolverConfiguration attributeResolverConfiguration = configurationFactory.getAttributeResolverConfiguration();
if ((attributeResolverConfiguration != null) && (attributeResolverConfiguration.getNameIdConfigs() != null)) {
this.usedNamedIds.clear();
for (NameIdConfig nameIdConfig : attributeResolverConfiguration.getNameIdConfigs()) {
this.nameIdConfigs.add(nameIdConfig);
this.usedNamedIds.put(nameIdConfig.getNameIdType(), nameIdConfig.getNameIdType());
}
}
return OxTrustConstants.RESULT_SUCCESS;
}
use of org.gluu.config.oxtrust.NameIdConfig in project oxTrust by GluuFederation.
the class Shibboleth3ConfService method initAttributeResolverParamMap.
public HashMap<String, Object> initAttributeResolverParamMap() {
List<NameIdConfig> nameIdConfigs = new ArrayList<NameIdConfig>();
Set<GluuAttribute> nameIdAttributes = new HashSet<GluuAttribute>();
AttributeResolverConfiguration attributeResolverConfiguration = configurationFactory.getAttributeResolverConfiguration();
if ((attributeResolverConfiguration != null) && (attributeResolverConfiguration.getNameIdConfigs() != null)) {
for (NameIdConfig nameIdConfig : attributeResolverConfiguration.getNameIdConfigs()) {
if (StringHelper.isNotEmpty(nameIdConfig.getSourceAttribute()) && nameIdConfig.isEnabled()) {
String attributeName = nameIdConfig.getSourceAttribute();
GluuAttribute attribute = attributeService.getAttributeByName(attributeName);
nameIdConfigs.add(nameIdConfig);
nameIdAttributes.add(attribute);
}
}
}
HashMap<String, Object> attributeResolverParams = createAttributeMap(nameIdAttributes);
attributeResolverParams.put("configs", nameIdConfigs);
attributeResolverParams.put("attributes", nameIdAttributes);
String baseUserDn = personService.getDnForPerson(null);
String persistenceType = persistenceEntryManager.getPersistenceType(baseUserDn);
log.debug(">>>>>>>>>> Shibboleth3ConfService.initAttributeResolverParamMap() - Persistance type: '{}'", persistenceType);
attributeResolverParams.put("persistenceType", persistenceType);
return attributeResolverParams;
}
use of org.gluu.config.oxtrust.NameIdConfig in project oxTrust by GluuFederation.
the class ConfigureNameIdAction method addNameIdConfig.
public void addNameIdConfig() {
NameIdConfig nameIdConfig = new NameIdConfig();
this.nameIdConfigs.add(nameIdConfig);
}
Aggregations