Resources to assign router to real user
Create a new device assignment
The node-client
generates username
and password
and stores this credentials in it's configuration. Then the node-client
uses this credentials to
- create a new user
- get an auth token for this user
With the auth token the
node-client
creates a new device in the API and stores the device id in it's configuration. The user that created a device will get the following permissions:
- all device permissions
After creating the new device the
node-client
also creates a newdevice_ownership_authorisation
using i.e. the mac address of the hardware or the fastd key displayed after setting up a gluon router aspassword
.
POST /device_authorisations
{
device_id: ID,
password: PASSWORD,
type: "ownership"
}
This will allow a user who knows the password
to takeover ownership of the router later on using the webinterface.
Assign a device to a user
POST /device_authorisations (usually done by a real user using the webinterface)
{
device_id: ID,
password: PASSWORD,
type: "ownership",
user_id: ID
}