summaryrefslogtreecommitdiffstats
path: root/phosphor-ldap-config/utils.hpp
blob: 984aae6ea3978070d1888aa2e74e2f2c63f87036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <string>

namespace phosphor
{
namespace ldap
{

/** @brief checks that the given URI is valid LDAP's URI.
 *      LDAP's URL begins with "ldap://" and LDAPS's URL begins with "ldap://"
 *  @param[in] URI - URI which needs to be validated.
 *  @param[in] scheme - LDAP's scheme, scheme equals to "ldaps" to validate
 *       against LDAPS type URI, for LDAP type URI it is equals to "ldap".
 *  @returns true if it is valid otherwise false.
 */
bool isValidLDAPURI(const std::string& URI, const char* scheme);

} // namespace ldap
} // namespace phosphor
OpenPOWER on IntegriCloud