Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add implementation to build user schema extension with InputStream #401

Conversation

senthuran16
Copy link
Member

@senthuran16 senthuran16 commented Mar 27, 2024

Purpose

Currently, we only have the following method, where configFilePath is the path of SCIM2 Schema Extension config file (eg: scim2-schema-extension.config).

SCIMUserSchemaExtensionBuilder.getInstance().buildUserSchemaExtension(configFilePath)

In IS7 Connector [1], we pack this SCIM2 Schema Extension config file as a resource. For a resource file, we can get an InputStream, and it won't be possible to treat it as a file and get a file path. Therefore, we need to be able to build user schema extension with this InputStream as:

InputStream schemaExtensionConfigInputStream = ClaimMappingReader.class.getClassLoader()
                    .getResourceAsStream(SCIM2_SCHEMA_EXTENSION_CONFIG_FILE);
SCIMUserSchemaExtensionBuilder.getInstance().buildUserSchemaExtension(schemaExtensionConfigInputStream);

This PR introduces the buildUserSchemaExtension(InputStream inputStream) method. Fixes wso2/api-manager#2693

[1] wso2-extensions/apim-km-wso2is#135

@chamathns chamathns merged commit 98073cb into wso2:master Mar 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants