Search in sources :

Example 11 with PersonAuthenticationType

use of org.xdi.model.custom.script.type.auth.PersonAuthenticationType in project oxAuth by GluuFederation.

the class ExternalAuthenticationService method executeExternalPrepareForStep.

public boolean executeExternalPrepareForStep(CustomScriptConfiguration customScriptConfiguration, Map<String, String[]> requestParameters, int step) {
    try {
        log.debug("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);
    }
    return false;
}
Also used : PersonAuthenticationType(org.xdi.model.custom.script.type.auth.PersonAuthenticationType) InternalDefaultPersonAuthenticationType(org.xdi.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 12 with PersonAuthenticationType

use of org.xdi.model.custom.script.type.auth.PersonAuthenticationType in project oxAuth by GluuFederation.

the class ExternalAuthenticationService method getNextStep.

public int getNextStep(CustomScriptConfiguration customScriptConfiguration, Map<String, String[]> requestParameters, int step) {
    try {
        log.debug("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);
    }
    return -1;
}
Also used : PersonAuthenticationType(org.xdi.model.custom.script.type.auth.PersonAuthenticationType) InternalDefaultPersonAuthenticationType(org.xdi.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Aggregations

PersonAuthenticationType (org.xdi.model.custom.script.type.auth.PersonAuthenticationType)12 InternalDefaultPersonAuthenticationType (org.xdi.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType)11 SimpleCustomProperty (org.xdi.model.SimpleCustomProperty)10 CustomScriptConfiguration (org.xdi.model.custom.script.conf.CustomScriptConfiguration)1