Search in sources :

Example 16 with SimpleCustomProperty

use of org.gluu.model.SimpleCustomProperty in project oxAuth by GluuFederation.

the class ExternalAuthenticationService method getLogoutExternalUrl.

public String getLogoutExternalUrl(CustomScriptConfiguration customScriptConfiguration, Map<String, String[]> requestParameters) {
    try {
        log.trace("Executing python 'getLogouExternalUrl' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.getLogoutExternalUrl(configurationAttributes, requestParameters);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
        saveScriptError(customScriptConfiguration.getCustomScript(), ex);
    }
    return null;
}
Also used : PersonAuthenticationType(org.gluu.model.custom.script.type.auth.PersonAuthenticationType) InternalDefaultPersonAuthenticationType(org.gluu.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType) SimpleCustomProperty(org.gluu.model.SimpleCustomProperty)

Example 17 with SimpleCustomProperty

use of org.gluu.model.SimpleCustomProperty in project oxAuth by GluuFederation.

the class ExternalAuthenticationService method executeExternalPrepareForStep.

public boolean executeExternalPrepareForStep(CustomScriptConfiguration customScriptConfiguration, Map<String, String[]> requestParameters, int step) {
    try {
        log.trace("Executing python 'prepareForStep' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.prepareForStep(configurationAttributes, requestParameters, step);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
        saveScriptError(customScriptConfiguration.getCustomScript(), ex);
    }
    return false;
}
Also used : PersonAuthenticationType(org.gluu.model.custom.script.type.auth.PersonAuthenticationType) InternalDefaultPersonAuthenticationType(org.gluu.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType) SimpleCustomProperty(org.gluu.model.SimpleCustomProperty)

Example 18 with SimpleCustomProperty

use of org.gluu.model.SimpleCustomProperty in project oxAuth by GluuFederation.

the class ExternalAuthenticationService method executeExternalAuthenticate.

public boolean executeExternalAuthenticate(CustomScriptConfiguration customScriptConfiguration, Map<String, String[]> requestParameters, int step) {
    try {
        log.trace("Executing python 'authenticate' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.authenticate(configurationAttributes, requestParameters, step);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
        saveScriptError(customScriptConfiguration.getCustomScript(), ex);
    }
    return false;
}
Also used : PersonAuthenticationType(org.gluu.model.custom.script.type.auth.PersonAuthenticationType) InternalDefaultPersonAuthenticationType(org.gluu.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType) SimpleCustomProperty(org.gluu.model.SimpleCustomProperty)

Example 19 with SimpleCustomProperty

use of org.gluu.model.SimpleCustomProperty 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

SimpleCustomProperty (org.gluu.model.SimpleCustomProperty)19 PersonAuthenticationType (org.gluu.model.custom.script.type.auth.PersonAuthenticationType)10 InternalDefaultPersonAuthenticationType (org.gluu.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType)10 ClientRegistrationType (org.gluu.model.custom.script.type.client.ClientRegistrationType)2 DynamicScopeType (org.gluu.model.custom.script.type.scope.DynamicScopeType)2 ApplicationSessionType (org.gluu.model.custom.script.type.session.ApplicationSessionType)2 AuthenticationScriptUsageType (org.gluu.model.AuthenticationScriptUsageType)1 CustomAuthenticationConfiguration (org.gluu.model.config.CustomAuthenticationConfiguration)1 CustomScriptConfiguration (org.gluu.model.custom.script.conf.CustomScriptConfiguration)1 CustomScript (org.gluu.model.custom.script.model.CustomScript)1 AuthenticationCustomScript (org.gluu.model.custom.script.model.auth.AuthenticationCustomScript)1 IdGeneratorType (org.gluu.model.custom.script.type.id.IdGeneratorType)1 CustomProperty (org.oxauth.persistence.model.configuration.CustomProperty)1