This feature is available since Mender Client 3.0.
This interface lets applications authenticate with the Mender server. The Mender Client will handle the authentication and provide the user with a JSON Web Token (JWT) and the server URL, which the user can use to do API calls to the Mender server on his own. It is exposed at
io.mender.AuthenticationManager
/io/mender/AuthenticationManager
GetJwtToken (OUT s token,
OUT s server_url);
Gets current JWT token and server URL. If no JWT token is available, an empty token is returned
Parameter | Description |
---|---|
OUT s token |
Valid JWT token |
OUT s server_url |
Server URL |
FetchJwtToken (OUT b success);
Instructs the Mender Client to fetch the JWT token from the server. When the token is ready, a JwtTokenStateChange signal will be emitted.
Parameter | Description |
---|---|
OUT b success |
false on errors |
JwtTokenStateChange (s token,
s server_url);
Emitted whenever a valid JWT is available in the Mender Client. The event includes the new token and the server URL.
Parameter | Description |
---|---|
s token |
Current JWT token |
s server_url |
Server URL |
© 2024 Northern.tech AS