use of org.wso2.carbon.identity.scim2.common.utils.AuthenticationSchema in project identity-inbound-provisioning-scim2 by wso2-extensions.
the class IdentitySCIMManager method registerCharonConfig.
/**
* This create the basic operational configurations for charon
*/
private void registerCharonConfig() throws CharonException {
try {
// Config charon.
// This values will be used in /ServiceProviderConfigResource endpoint and some default charon configs.
CharonConfiguration charonConfiguration = CharonConfiguration.getInstance();
SCIMConfigProcessor scimConfigProcessor = SCIMConfigProcessor.getInstance();
charonConfiguration.setDocumentationURL(scimConfigProcessor.getProperty(SCIMCommonConstants.DOCUMENTATION_URL));
charonConfiguration.setBulkSupport(Boolean.parseBoolean(scimConfigProcessor.getProperty(SCIMCommonConstants.BULK_SUPPORTED)), Integer.parseInt(scimConfigProcessor.getProperty(SCIMCommonConstants.BULK_MAX_OPERATIONS)), Integer.parseInt(scimConfigProcessor.getProperty(SCIMCommonConstants.BULK_MAX_PAYLOAD_SIZE)));
charonConfiguration.setSortSupport(Boolean.parseBoolean(scimConfigProcessor.getProperty(SCIMCommonConstants.SORT_SUPPORTED)));
charonConfiguration.setPatchSupport(Boolean.parseBoolean(scimConfigProcessor.getProperty(SCIMCommonConstants.PATCH_SUPPORTED)));
charonConfiguration.setETagSupport(Boolean.parseBoolean(scimConfigProcessor.getProperty(SCIMCommonConstants.ETAG_SUPPORTED)));
charonConfiguration.setChangePasswordSupport(Boolean.parseBoolean(scimConfigProcessor.getProperty(SCIMCommonConstants.CHNAGE_PASSWORD_SUPPORTED)));
charonConfiguration.setFilterSupport(Boolean.parseBoolean(scimConfigProcessor.getProperty(SCIMCommonConstants.FILTER_SUPPORTED)), Integer.parseInt(scimConfigProcessor.getProperty(SCIMCommonConstants.FILTER_MAX_RESULTS)));
charonConfiguration.setCountValueForPagination(Integer.parseInt(scimConfigProcessor.getProperty(SCIMCommonConstants.PAGINATION_DEFAULT_COUNT)));
ArrayList<Object[]> schemaList = new ArrayList<>();
for (AuthenticationSchema authenticationSchema : scimConfigProcessor.getAuthenticationSchemas()) {
Object[] schema = { authenticationSchema.getName(), authenticationSchema.getDescription(), authenticationSchema.getSpecUri(), authenticationSchema.getDocumentationUri(), authenticationSchema.getType(), authenticationSchema.getPrimary() };
schemaList.add(schema);
}
charonConfiguration.setAuthenticationSchemes(schemaList);
} catch (Exception e) {
throw new CharonException("Error in setting up charon configurations.", e);
}
}
Aggregations