use of org.gluu.model.custom.script.type.session.ApplicationSessionType in project oxAuth by GluuFederation.
the class ExternalApplicationSessionService method externalEvent.
private void externalEvent(CustomScriptConfiguration scriptConfiguration, SessionEvent event) {
try {
log.trace("Executing python 'onEvent' method of script: " + scriptConfiguration.getName() + ", event: " + event);
event.setScriptConfiguration(scriptConfiguration);
ApplicationSessionType applicationSessionType = (ApplicationSessionType) scriptConfiguration.getExternalType();
applicationSessionType.onEvent(event);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(scriptConfiguration.getCustomScript(), ex);
}
}
use of org.gluu.model.custom.script.type.session.ApplicationSessionType in project oxAuth by GluuFederation.
the class ExternalApplicationSessionService method executeExternalStartSessionMethod.
public boolean executeExternalStartSessionMethod(CustomScriptConfiguration customScriptConfiguration, HttpServletRequest httpRequest, SessionId sessionId) {
try {
log.trace("Executing python 'startSession' method");
ApplicationSessionType applicationSessionType = (ApplicationSessionType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return applicationSessionType.startSession(httpRequest, sessionId, configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(customScriptConfiguration.getCustomScript(), ex);
}
return false;
}
use of org.gluu.model.custom.script.type.session.ApplicationSessionType in project oxAuth by GluuFederation.
the class ExternalApplicationSessionService method executeExternalEndSessionMethod.
public boolean executeExternalEndSessionMethod(CustomScriptConfiguration customScriptConfiguration, HttpServletRequest httpRequest, SessionId sessionId) {
try {
log.trace("Executing python 'endSession' method");
ApplicationSessionType applicationSessionType = (ApplicationSessionType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return applicationSessionType.endSession(httpRequest, sessionId, configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(customScriptConfiguration.getCustomScript(), ex);
}
return false;
}
Aggregations