Search in sources :

Example 21 with SimpleCustomProperty

use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.

the class ExternalScimService method executeScimCreateGroupMethod.

public boolean executeScimCreateGroupMethod(GluuGroup group, CustomScriptConfiguration customScriptConfiguration) {
    try {
        log.debug("Executing python 'SCIM Create Group' method");
        ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        boolean result = externalType.createGroup(group, configurationAttributes);
        log.debug("executeScimCreateGroupMethod result = " + result);
        return result;
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return false;
}
Also used : ScimType(org.xdi.model.custom.script.type.scim.ScimType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 22 with SimpleCustomProperty

use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.

the class ExternalUpdateUserService method executeExternalUpdateUserMethod.

public boolean executeExternalUpdateUserMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, boolean persisted) {
    try {
        log.debug("Executing python 'updateUser' method");
        UpdateUserType externalType = (UpdateUserType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.updateUser(user, persisted, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : SimpleCustomProperty(org.xdi.model.SimpleCustomProperty) UpdateUserType(org.xdi.model.custom.script.type.user.UpdateUserType)

Example 23 with SimpleCustomProperty

use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.

the class ExternalUpdateUserService method executeExternalAddUserMethod.

public boolean executeExternalAddUserMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, boolean persisted) {
    try {
        log.debug("Executing python 'addUser' method");
        UpdateUserType externalType = (UpdateUserType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.addUser(user, persisted, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : SimpleCustomProperty(org.xdi.model.SimpleCustomProperty) UpdateUserType(org.xdi.model.custom.script.type.user.UpdateUserType)

Example 24 with SimpleCustomProperty

use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.

the class ExternalUserRegistrationService method executeExternalPostRegistrationMethod.

public boolean executeExternalPostRegistrationMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, Map<String, String[]> requestParameters) {
    try {
        log.debug("Executing python 'postRegistration' method");
        UserRegistrationType externalType = (UserRegistrationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.postRegistration(user, requestParameters, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : UserRegistrationType(org.xdi.model.custom.script.type.user.UserRegistrationType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Example 25 with SimpleCustomProperty

use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.

the class ExternalUserRegistrationService method executeExternalConfirmRegistrationMethod.

public boolean executeExternalConfirmRegistrationMethod(CustomScriptConfiguration customScriptConfiguration, GluuCustomPerson user, Map<String, String[]> requestParameters) {
    try {
        log.debug("Executing python 'confirmRegistration' method");
        UserRegistrationType externalType = (UserRegistrationType) customScriptConfiguration.getExternalType();
        Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
        return externalType.confirmRegistration(user, requestParameters, configurationAttributes);
    } catch (Exception ex) {
        log.error(ex.getMessage(), ex);
    }
    return false;
}
Also used : UserRegistrationType(org.xdi.model.custom.script.type.user.UserRegistrationType) SimpleCustomProperty(org.xdi.model.SimpleCustomProperty)

Aggregations

SimpleCustomProperty (org.xdi.model.SimpleCustomProperty)41 PersonAuthenticationType (org.xdi.model.custom.script.type.auth.PersonAuthenticationType)10 InternalDefaultPersonAuthenticationType (org.xdi.oxauth.service.external.internal.InternalDefaultPersonAuthenticationType)10 ScimType (org.xdi.model.custom.script.type.scim.ScimType)6 CustomScript (org.xdi.model.custom.script.model.CustomScript)4 UpdateUserType (org.xdi.model.custom.script.type.user.UpdateUserType)4 UserRegistrationType (org.xdi.model.custom.script.type.user.UserRegistrationType)4 AuthenticationCustomScript (org.xdi.model.custom.script.model.auth.AuthenticationCustomScript)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 AuthenticationScriptUsageType (org.xdi.model.AuthenticationScriptUsageType)2 CustomScriptConfiguration (org.xdi.model.custom.script.conf.CustomScriptConfiguration)2 BaseExternalType (org.xdi.model.custom.script.type.BaseExternalType)2 IdGeneratorType (org.xdi.model.custom.script.type.id.IdGeneratorType)2 File (java.io.File)1 FileFilter (java.io.FileFilter)1 IOException (java.io.IOException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 List (java.util.List)1 Entry (java.util.Map.Entry)1