Nagaraju Goruganti | 59287f0 | 2018-10-12 07:00:20 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <string> |
| 4 | |
| 5 | namespace phosphor |
| 6 | { |
| 7 | namespace ldap |
| 8 | { |
| 9 | |
| 10 | /** @brief checks that the given URI is valid LDAP's URI. |
| 11 | * LDAP's URL begins with "ldap://" and LDAPS's URL begins with "ldap://" |
| 12 | * @param[in] URI - URI which needs to be validated. |
| 13 | * @param[in] scheme - LDAP's scheme, scheme equals to "ldaps" to validate |
| 14 | * against LDAPS type URI, for LDAP type URI it is equals to "ldap". |
| 15 | * @returns true if it is valid otherwise false. |
| 16 | */ |
Nan Zhou | 78d8504 | 2022-08-29 17:50:22 +0000 | [diff] [blame] | 17 | bool isValidLDAPURI(const std::string& uri, const char* scheme); |
Nagaraju Goruganti | 59287f0 | 2018-10-12 07:00:20 -0500 | [diff] [blame] | 18 | |
| 19 | } // namespace ldap |
| 20 | } // namespace phosphor |