cablelabs / lpwanserver

LPWAN Provisioning & Management Server
https://lpwanserver.com
Apache License 2.0
37 stars 11 forks source link

Move network sessions into network clients. #286

Closed rhythnic closed 5 years ago

rhythnic commented 5 years ago

What does this PR do?

Do you have any concerns with this PR?

No

How can the reviewer verify this PR?

View

Any background context you want to provide?

It's pretty common for an API client to manage the session. Previously there were no REST clients in LPWAN Server, but now that there are, it makes sense to have them manage the session. This means that all the passing the session all over the place can go away.

In addition, now, a network's credentials are always used for all network requests. Previously an application or device network request had the option of fetching other credentials from the DB to use. That is tied in with companies. Having all requests use the same credentials is a step towards decoupling LPWAN Server companies from network companies. As a follow up, LPWAN Server should be updated so as to not create companies and users on network servers, nor should it create local companies to match network server organizations.

Screenshots or logs (if appropriate)

Questions: