Interface CredentialsProvider

    • Method Detail

      • getCredentialMap

        default Map<String,​String> getCredentialMap()
        Retrieves credential properties as a map for database connection. Default Behavior: The default implementation returns a map containing only the basic "user" and "password" properties extracted from the DefaultCredentials object returned by getCredential(). This maintains backward compatibility with existing JDBC connection patterns. Extended Behavior: Implementations can override this method to provide additional connection properties beyond just username and password. This enables support for advanced authentication mechanisms. Usage: The returned map is directly applied to JDBC connection properties, allowing for seamless integration with various database drivers and authentication schemes without requiring custom connection factory implementations.
        Returns:
        Map containing credential properties for database connection. The default implementation returns a map with "user" and "password" keys. Overriding implementations may return additional properties as needed for their specific authentication requirements.