mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -62,9 +62,9 @@ namespace OpenWifi {
|
|||||||
if(RE.UseGWProxy) {
|
if(RE.UseGWProxy) {
|
||||||
Poco::JSON::Object ServerSettings;
|
Poco::JSON::Object ServerSettings;
|
||||||
if (RE.Type == "orion") {
|
if (RE.Type == "orion") {
|
||||||
return OpenRoaming_Orion()->Render(RE, Result);
|
return OpenRoaming_Orion()->Render(RE, SerialNumber_, Result);
|
||||||
} else if (RE.Type == "globalreach") {
|
} else if (RE.Type == "globalreach") {
|
||||||
return OpenRoaming_GlobalReach()->Render(RE, Result);
|
return OpenRoaming_GlobalReach()->Render(RE, SerialNumber_, Result);
|
||||||
} else if (RE.Type == "radsec") {
|
} else if (RE.Type == "radsec") {
|
||||||
|
|
||||||
} else if (RE.Type == "radius") {
|
} else if (RE.Type == "radius") {
|
||||||
@@ -169,6 +169,7 @@ namespace OpenWifi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool APConfig::Get(Poco::JSON::Object::Ptr &Configuration) {
|
bool APConfig::Get(Poco::JSON::Object::Ptr &Configuration) {
|
||||||
|
|
||||||
if (Config_.empty()) {
|
if (Config_.empty()) {
|
||||||
Explanation_.clear();
|
Explanation_.clear();
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace OpenWifi {
|
|||||||
StorageService()->GLBLRAccountInfoDB().Iterate(F);
|
StorageService()->GLBLRAccountInfoDB().Iterate(F);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenRoaming::Render(const OpenWifi::ProvObjects::RADIUSEndPoint &RE, Poco::JSON::Object &Result) {
|
bool OpenRoaming::Render(const OpenWifi::ProvObjects::RADIUSEndPoint &RE, const std::string &SerialNumber, Poco::JSON::Object &Result) {
|
||||||
if(RE.UseGWProxy) {
|
if(RE.UseGWProxy) {
|
||||||
Poco::JSON::Object Auth, Acct, CoA;
|
Poco::JSON::Object Auth, Acct, CoA;
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ namespace OpenWifi {
|
|||||||
CoA.set("port", 3799);
|
CoA.set("port", 3799);
|
||||||
CoA.set("secret", RE.RadsecServers[0].Secret);
|
CoA.set("secret", RE.RadsecServers[0].Secret);
|
||||||
|
|
||||||
Result.set("nas-identifier", RE.NasIdentifier);
|
Result.set("nas-identifier", RE.NasIdentifier.empty() ? SerialNumber : RE.NasIdentifier );
|
||||||
Result.set("authentication", Auth);
|
Result.set("authentication", Auth);
|
||||||
Result.set("accounting", Acct);
|
Result.set("accounting", Acct);
|
||||||
Result.set("dynamic-authorization", CoA);
|
Result.set("dynamic-authorization", CoA);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
void InitCache();
|
void InitCache();
|
||||||
|
|
||||||
bool Render(const OpenWifi::ProvObjects::RADIUSEndPoint &RE, Poco::JSON::Object &Result);
|
bool Render(const OpenWifi::ProvObjects::RADIUSEndPoint &RE, const std::string & SerialNUmber, Poco::JSON::Object &Result);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string MakeToken(const std::string &GlobalReachAccountId, const std::string &PrivateKey = "");
|
std::string MakeToken(const std::string &GlobalReachAccountId, const std::string &PrivateKey = "");
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ namespace OpenWifi {
|
|||||||
return OrionWifiServerAddresses;
|
return OrionWifiServerAddresses;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool Render(const OpenWifi::ProvObjects::RADIUSEndPoint &RE, Poco::JSON::Object &Result) {
|
inline bool Render(const OpenWifi::ProvObjects::RADIUSEndPoint &RE, const std::string &SerialNumber, Poco::JSON::Object &Result) {
|
||||||
if(RE.UseGWProxy) {
|
if(RE.UseGWProxy) {
|
||||||
Poco::JSON::Object Auth, Acct, CoA;
|
Poco::JSON::Object Auth, Acct, CoA;
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ namespace OpenWifi {
|
|||||||
CoA.set("port", 3799);
|
CoA.set("port", 3799);
|
||||||
CoA.set("secret", RE.RadsecServers[0].Secret);
|
CoA.set("secret", RE.RadsecServers[0].Secret);
|
||||||
|
|
||||||
Result.set("nas-identifier", RE.NasIdentifier);
|
Result.set("nas-identifier", RE.NasIdentifier.empty() ? SerialNumber : RE.NasIdentifier );
|
||||||
Result.set("authentication", Auth);
|
Result.set("authentication", Auth);
|
||||||
Result.set("accounting", Acct);
|
Result.set("accounting", Acct);
|
||||||
Result.set("dynamic-authorization", CoA);
|
Result.set("dynamic-authorization", CoA);
|
||||||
|
|||||||
Reference in New Issue
Block a user