Search in sources :

Example 1 with SimpleCustomProperty

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

the class ExternalAuthenticationService method executeExternalGetPageForStep.

public String executeExternalGetPageForStep(CustomScriptConfiguration customScriptConfiguration, int step) {
    try {
        log.trace("Executing python 'getPageForStep' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.getPageForStep(configurationAttributes, step);
    } 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 2 with SimpleCustomProperty

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

the class ExternalAuthenticationService method executeExternalLogout.

public boolean executeExternalLogout(CustomScriptConfiguration customScriptConfiguration, Map<String, String[]> requestParameters) {
    try {
        log.trace("Executing python 'logout' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.logout(configurationAttributes, requestParameters);
    } 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 3 with SimpleCustomProperty

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

the class ExternalAuthenticationService method executeExternalGetCountAuthenticationSteps.

public int executeExternalGetCountAuthenticationSteps(CustomScriptConfiguration customScriptConfiguration) {
    try {
        log.trace("Executing python 'getCountAuthenticationSteps' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.getCountAuthenticationSteps(configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
        saveScriptError(customScriptConfiguration.getCustomScript(), ex);
    }
    return -1;
}
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 4 with SimpleCustomProperty

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

the class ExternalAuthenticationService method executeExternalGetExtraParametersForStep.

public List<String> executeExternalGetExtraParametersForStep(CustomScriptConfiguration customScriptConfiguration, int step) {
    try {
        log.trace("Executing python 'getExtraParametersForStep' authenticator method");
        PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalAuthenticator.getExtraParametersForStep(configurationAttributes, step);
    } 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 5 with SimpleCustomProperty

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

the class ExternalAuthenticationService method getNextStep.

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