Search in sources :

Example 1 with ApplicationSessionType

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);
    }
}
Also used : ApplicationSessionType(org.gluu.model.custom.script.type.session.ApplicationSessionType)

Example 2 with ApplicationSessionType

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;
}
Also used : ApplicationSessionType(org.gluu.model.custom.script.type.session.ApplicationSessionType) SimpleCustomProperty(org.gluu.model.SimpleCustomProperty)

Example 3 with ApplicationSessionType

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;
}
Also used : ApplicationSessionType(org.gluu.model.custom.script.type.session.ApplicationSessionType) SimpleCustomProperty(org.gluu.model.SimpleCustomProperty)

Aggregations

ApplicationSessionType (org.gluu.model.custom.script.type.session.ApplicationSessionType)3 SimpleCustomProperty (org.gluu.model.SimpleCustomProperty)2