blob: b1450b7fcaf0640513efccee7cc59a34ab1b0672 [file] [log] [blame]
Nagaraju Goruganti59287f02018-10-12 07:00:20 -05001#pragma once
2
3#include <string>
4
5namespace phosphor
6{
7namespace 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 Zhou78d85042022-08-29 17:50:22 +000017bool isValidLDAPURI(const std::string& uri, const char* scheme);
Nagaraju Goruganti59287f02018-10-12 07:00:20 -050018
19} // namespace ldap
20} // namespace phosphor