use of org.gluu.oxauth.model.config.BaseDnConfiguration in project oxAuth by GluuFederation.
the class ConfSerialization method claims.
@Test
public void claims() throws IOException {
final BaseDnConfiguration baseDn = new BaseDnConfiguration();
baseDn.setConfiguration("ou=configuration,o=gluu");
baseDn.setPeople("ou=people,o=gluu");
baseDn.setClients("ou=clients,o=gluu");
baseDn.setScopes("ou=scopes,o=gluu");
baseDn.setAttributes("ou=attributes,o=gluu");
final StaticConfiguration c = new StaticConfiguration();
c.setBaseDn(baseDn);
final String jsonStr = ServerUtil.createJsonMapper().writeValueAsString(c);
System.out.println(jsonStr);
}
use of org.gluu.oxauth.model.config.BaseDnConfiguration in project oxAuth by GluuFederation.
the class InumGenerator method baseDn.
public String baseDn(IdType p_type) {
final BaseDnConfiguration baseDn = staticConfiguration.getBaseDn();
switch(p_type) {
case CLIENTS:
return baseDn.getClients();
case CONFIGURATION:
return baseDn.getConfiguration();
case ATTRIBUTE:
return baseDn.getAttributes();
case PEOPLE:
return baseDn.getPeople();
}
// if not able to identify baseDn by type then return organization baseDn, e.g. o=gluu
Matcher m = baseRdnPattern.matcher(baseDn.getClients());
if (m.matches()) {
return m.group(1);
}
log.error("Use fallback DN: o=gluu, for ID generator, please check oxAuth configuration, clientDn must be valid DN");
return "o=gluu";
}
Aggregations