use of org.xdi.model.custom.script.model.CustomScript in project oxAuth by GluuFederation.
the class IdGenServiceTest method loadCustomScript.
@Test
public void loadCustomScript() {
final InputStream inputStream = IdGenServiceTest.class.getResourceAsStream("/id/gen/SampleIdGenerator.py");
try {
final String idScript = IOUtils.toString(inputStream);
CustomScript idCustomScript = buildIdCustomScriptEntry(idScript);
this.idCustomScriptDn = idCustomScript.getDn();
ldapEntryManager.persist(idCustomScript);
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
IOUtils.closeQuietly(inputStream);
}
}
Aggregations