Top |
A SnapdAuthData contains authorization data to communicate with snapd.
Authenticating with snapd_login_sync()
or snapd_client_login_sync()
returns
authorization data that can be used for requests by calling
snapd_client_set_auth_data()
.
It is recommended that the data is securely stored between sessions so authentication is not required to be repeated. The authorization data is made up of printable strings that can be easily written to a file/database.
SnapdAuthData * snapd_auth_data_new (const gchar *macaroon
,GStrv discharges
);
Create some authorization data.
macaroon |
serialized macaroon used to authorize access to snapd. |
|
discharges |
serialized discharges. |
[array zero-terminated=1] |
Since: 1.0
const gchar *
snapd_auth_data_get_macaroon (SnapdAuthData *auth_data
);
Get the Macaroon that this authorization uses.
Since: 1.0
GStrv
snapd_auth_data_get_discharges (SnapdAuthData *auth_data
);
Get the discharges that this authorization uses.
Since: 1.0
typedef struct _SnapdAuthData SnapdAuthData;
SnapdAuthData contains authorization data used to communicate with snapd.
The authorization data is in the form of a Macaroon.
Since: 1.0