Search in sources :

Example 1 with IdGeneratorType

use of org.xdi.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.debug("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);
    }
    return null;
}
Also used : IdGeneratorType(org.xdi.model.custom.script.type.id.IdGeneratorType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 2 with IdGeneratorType

use of org.xdi.model.custom.script.type.id.IdGeneratorType in project oxTrust by GluuFederation.

the class ExternalIdGeneratorService method executeExternalGenerateIdMethod.

public String executeExternalGenerateIdMethod(CustomScriptConfiguration customScriptConfiguration, String appId, String idType, String idPrefix) {
    try {
        log.debug("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);
    }
    return null;
}
Also used : IdGeneratorType(org.xdi.model.custom.script.type.id.IdGeneratorType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Aggregations

SimpleCustomProperty (org.xdi.model.SimpleCustomProperty)2 IdGeneratorType (org.xdi.model.custom.script.type.id.IdGeneratorType)2