- DBus implementation must using Glib's GIO dbus library (search for D-Bus to find various sub categories).
- DBus must live in the separate authentication Go routine from
MEN-4015, and be multiplexed with channel requests from the client.
- Client must register itself on the system bus as io.mender.AuthenticationManager
- The D-Bus object name must be /io/mender/AuthenticationManager
- The interface name must be io.mender.Authentication1
- The member name must be GetJwtToken (the full name will be io.mender.Authentication1.GetJwtToken if combined with the interface name)
- The endpoint must return the current JWT token.
- If no JWT token is available, error must be returned.
- Endpoint must not trigger authentication (this is a different endpoint).
MEN-4032, it must be possible to completely compile out the Glib dependency, and hence the API.
This introduction page is useful to understand the different DBus concepts. Also, in the demo that was made for this feature earlier, this command line was used to query the deployment API, which may serve as an example:
In the case of authentication, this would be: