use of io.jans.model.SimpleCustomProperty in project jans by JanssenProject.
the class ExternalIdGeneratorService method executeExternalGenerateIdMethod.
public String executeExternalGenerateIdMethod(CustomScriptConfiguration customScriptConfiguration, String appId, String idType, String idPrefix) {
try {
log.debug("Executing python 'generateId' method");
IdGeneratorType externalType = (IdGeneratorType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return externalType.generateId(appId, idType, idPrefix, configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(customScriptConfiguration.getCustomScript(), ex);
}
return null;
}
use of io.jans.model.SimpleCustomProperty in project jans by JanssenProject.
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;
}
use of io.jans.model.SimpleCustomProperty in project jans by JanssenProject.
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;
}
use of io.jans.model.SimpleCustomProperty in project jans by JanssenProject.
the class ExternalAuthenticationService method executeExternalIsValidAuthenticationMethod.
private boolean executeExternalIsValidAuthenticationMethod(AuthenticationScriptUsageType usageType, CustomScriptConfiguration customScriptConfiguration) {
try {
log.debug("Executing python 'isValidAuthenticationMethod' authenticator method");
PersonAuthenticationType externalAuthenticator = (PersonAuthenticationType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return externalAuthenticator.isValidAuthenticationMethod(usageType, configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
saveScriptError(customScriptConfiguration.getCustomScript(), ex);
}
return false;
}
use of io.jans.model.SimpleCustomProperty in project jans by JanssenProject.
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;
}
Aggregations