use of org.gluu.model.custom.script.type.scope.DynamicScopeType in project oxAuth by GluuFederation.
the class ExternalDynamicScopeService method executeExternalUpdateMethod.
public boolean executeExternalUpdateMethod(CustomScriptConfiguration customScriptConfiguration, DynamicScopeExternalContext dynamicScopeContext) {
try {
log.trace("Executing python 'update' method");
DynamicScopeType dynamicScopeType = (DynamicScopeType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return dynamicScopeType.update(dynamicScopeContext, configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(customScriptConfiguration.getCustomScript(), ex);
}
return false;
}
use of org.gluu.model.custom.script.type.scope.DynamicScopeType in project oxAuth by GluuFederation.
the class ExternalDynamicScopeService method executeExternalGetSupportedClaimsMethod.
public List<String> executeExternalGetSupportedClaimsMethod(CustomScriptConfiguration customScriptConfiguration) {
int apiVersion = executeExternalGetApiVersion(customScriptConfiguration);
if (apiVersion > 1) {
try {
log.trace("Executing python 'get supported claims' method");
DynamicScopeType dynamicScopeType = (DynamicScopeType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return dynamicScopeType.getSupportedClaims(configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(customScriptConfiguration.getCustomScript(), ex);
}
}
return null;
}
Aggregations