Search in sources :

Example 1 with IdGeneratorType

use of org.gluu.model.custom.script.type.id.IdGeneratorType in project oxAuth by GluuFederation.

the class ExternalIdGeneratorService method executeExternalGenerateIdMethod.

public String executeExternalGenerateIdMethod(CustomScriptConfiguration customScriptConfiguration, String appId, String idType, String idPrefix) {
    try {
        log.trace("Executing python 'generateId' method");
        IdGeneratorType externalType = (IdGeneratorType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.generateId(appId, idType, idPrefix, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
        saveScriptError(customScriptConfiguration.getCustomScript(), ex);
    }
    return null;
}
Also used : IdGeneratorType(org.gluu.model.custom.script.type.id.IdGeneratorType) SimpleCustomProperty(org.gluu.model.SimpleCustomProperty)

Aggregations

SimpleCustomProperty (org.gluu.model.SimpleCustomProperty)1 IdGeneratorType (org.gluu.model.custom.script.type.id.IdGeneratorType)1