mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -62,9 +62,9 @@ namespace OpenWifi {
|
||||
if(RE.UseGWProxy) {
|
||||
Poco::JSON::Object ServerSettings;
|
||||
if (RE.Type == "orion") {
|
||||
return OpenRoaming_Orion()->Render(RE, Result);
|
||||
return OpenRoaming_Orion()->Render(RE, SerialNumber_, Result);
|
||||
} 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 == "radius") {
|
||||
@@ -169,6 +169,7 @@ namespace OpenWifi {
|
||||
}
|
||||
|
||||
bool APConfig::Get(Poco::JSON::Object::Ptr &Configuration) {
|
||||
|
||||
if (Config_.empty()) {
|
||||
Explanation_.clear();
|
||||
try {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenWifi {
|
||||
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) {
|
||||
Poco::JSON::Object Auth, Acct, CoA;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace OpenWifi {
|
||||
CoA.set("port", 3799);
|
||||
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("accounting", Acct);
|
||||
Result.set("dynamic-authorization", CoA);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenWifi {
|
||||
|
||||
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:
|
||||
std::string MakeToken(const std::string &GlobalReachAccountId, const std::string &PrivateKey = "");
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenWifi {
|
||||
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) {
|
||||
Poco::JSON::Object Auth, Acct, CoA;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenWifi {
|
||||
CoA.set("port", 3799);
|
||||
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("accounting", Acct);
|
||||
Result.set("dynamic-authorization", CoA);
|
||||
|
||||
Reference in New Issue
Block a user