Basic plumbing for authentication requirement and piping through of URL information.

This commit is contained in:
Adam Ierymenko
2021-05-24 22:58:17 -04:00
parent 9c58308e6a
commit b270d527f4
13 changed files with 124 additions and 13 deletions

View File

@ -220,6 +220,16 @@ public:
_netconfFailure = NETCONF_FAILURE_NOT_FOUND;
}
/**
* Set netconf failure to 'authentication required' possibly with an authorization URL
*/
inline void setAuthenticationRequired(const char *url)
{
Mutex::Lock _l(_lock);
_netconfFailure = NETCONF_FAILURE_AUTHENTICATION_REQUIRED;
_authorizationURL = (url) ? url : "";
}
/**
* Causes this network to request an updated configuration from its master node now
*
@ -435,9 +445,11 @@ private:
NETCONF_FAILURE_NONE,
NETCONF_FAILURE_ACCESS_DENIED,
NETCONF_FAILURE_NOT_FOUND,
NETCONF_FAILURE_INIT_FAILED
NETCONF_FAILURE_INIT_FAILED,
NETCONF_FAILURE_AUTHENTICATION_REQUIRED
} _netconfFailure;
int _portError; // return value from port config callback
std::string _authorizationURL;
Hashtable<Address,Membership> _memberships;