diff --git a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/util/IdentityApplicationManagementUtil.java b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/util/IdentityApplicationManagementUtil.java index 53dbd658dcf7..7e9ccac129ca 100644 --- a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/util/IdentityApplicationManagementUtil.java +++ b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/util/IdentityApplicationManagementUtil.java @@ -939,6 +939,25 @@ public static List getPropertyValuesForNameStartsWith(FederatedAuthentic return propValueSet; } + /** + * Get a list of property values for a given property name prefix. + * + * @param properties Authenticator config properties to iterate with. + * @param propNameStartsWith the prefix of the property name. + * @return the list of values which starts with the propNameStartsWith. + */ + public static List getPropertyValuesForNameStartsWith(Property[] properties, String propNameStartsWith) { + + List propValueSet = new ArrayList<>(); + for (Property property : properties) { + if (property.getName().startsWith(propNameStartsWith)) { + propValueSet.add(property.getValue()); + } + } + + return propValueSet; + } + public static String getPropertyValue(Property[] properties, String propertyName) { Property property = getProperty(properties, propertyName);