4.1 Register with Password
Sample Code
#include "BayunCore.h"
std::string sessionId = "<sessionId>"
std::string companyName = "bayunsystems.com"; // company portion from loginId
std::string companyEmployeeId = "username"; //username portion from loginId
std::string password = "<employeePassword>";
Bayun::ShAuthenticateResponse authResponse =
bayunCore->registerEmployeeWithPassword(sessionId, companyName, companyEmployeeId, password);
if (authResponse != nullptr) {
std::string sessionId = authResponse->sessionId.c_str();
Bayun::BayunAuthResponseCode responseCode = authResponse->responseCode;
if (responseCode == Bayun::BayunAuthResponseCode::Success) {
//perform Bayun Operations
} else if (responseCode == Bayun::BayunAuthResponseCode::EmployeeAuthorizationPending) {
//EmployeeAuthorizationPending
}
}Last updated