Interface CustomDataSourceDriver

    • Method Detail

      • testConnection

        boolean testConnection()
        This method is used to determine whether the connection managed by a specific driver instance is available. This method is used by the PingFederate UI prior to rendering to determine whether the driver information should be editable.
        Returns:
        true if the connection is available
      • retrieveValues

        Map<String,​Object> retrieveValues​(Collection<String> attributeNamesToFill,
                                                SimpleFieldList filterConfiguration)
                                         throws CustomDataSourceDriverException
        This method is called by PingFederate when a connection (either IdP or SP) needs to retrieve information from the specified driver. This method is expected to return a map containing the resulting values. The values in this map can be java.lang objects like strings or numbers, or they can be wrapped as instances of AttributeValue. For best compatibility with PingFederate features and external systems, values should either be strings or collections of strings. For string collections, it's recommended to wrap the collection as an AttributeValue using AttrValueSupport.make(Collection).
        Parameters:
        attributeNamesToFill - An array of names to retrieve values for. In the JDBC paradigm, these would be column names.
        filterConfiguration - A SimpleFieldList list of filter criteria to use when retrieve values. May be null if no filter configuration is provided. These fields are described by the CustomDataSourceDriverDescriptor class.
        Returns:
        A map, keyed by values from the attributeNamesToFill array, that contains values retrieved by the custom driver. If no data matches the filter criteria, then an empty Map should be returned. Null should not be returned.
        Throws:
        CustomDataSourceDriverException - If an error occurs while retrieving values.
      • getAvailableFields

        List<String> getAvailableFields()
        PingFederate will take the list returned from this method, and display the field names as individual checkbox items. The user can select those fields for which they want values, and then map those selected field names against adapter contracts. During execution, the names that the user has mapped will be sent to the retrieveValues(Collection, SimpleFieldList) method.
        Returns:
        A list of available fields to display to the user.
      • encodeFilterFieldParam

        default String encodeFilterFieldParam​(String filterFieldName,
                                              String paramToEncode)
        This method is called by PingFederate prior to retrieving information from the specified driver. It calls this method to encode any source attribute values used by filters that are applied during information retrieval. For example, if the filter field is applied in a URL, then the driver may wish to URL encode the filter field.

        The default implementation of this method returns the same parameter without any encoding

        Parameters:
        filterFieldName - the String name of the filter field
        paramToEncode - the String value of the source attribute that needs to be encoded
        Returns:
        the encoded String value of the parameter to encode