use of org.gluu.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);
}
}
use of org.gluu.model.custom.script.model.CustomScript in project oxAuth by GluuFederation.
the class IdGenServiceTest method removeCustomScript.
@Test(dependsOnMethods = "testCustomIdGenerationByPythonScript")
public void removeCustomScript() {
CustomScript customScript = new CustomScript();
customScript.setDn(this.idCustomScriptDn);
ldapEntryManager.remove(customScript);
}
Aggregations