/** * signon_identity_store_credentials_with_args: * @self: the #SignonIdentity. * @username: username. * @secret: secret. * @store_secret: whether signond should store the password. * @methods: (transfer none) (element-type utf8 GStrv): methods. * @caption: caption. * @realms: (transfer none) (type GStrv): realms. * @access_control_list: (transfer none) (type GStrv): access control list. * @type: the type of the identity. * @cb: (scope async): callback. * @user_data: user_data. * * Stores the given data into the identity. */ void signon_identity_store_credentials_with_args(SignonIdentity *self, const gchar *username, const gchar *secret, const gboolean store_secret, const GHashTable *methods, const gchar *caption, const gchar* const *realms, const gchar* const *access_control_list, SignonIdentityType type, SignonIdentityStoreCredentialsCb cb, gpointer user_data) { SignonIdentityInfo *info; g_return_if_fail (SIGNON_IS_IDENTITY (self)); info = signon_identity_info_new (); signon_identity_info_set_username (info, username); signon_identity_info_set_secret (info, secret, store_secret); signon_identity_info_set_methods (info, methods); signon_identity_info_set_caption (info, caption); signon_identity_info_set_realms (info, realms); signon_identity_info_set_access_control_list (info, access_control_list); signon_identity_info_set_identity_type (info, type); signon_identity_store_credentials_with_info (self, info, cb, user_data); signon_identity_info_free (info); }
static SignonIdentityInfo *create_standard_info() { g_debug("%s", G_STRFUNC); SignonIdentityInfo *info = signon_identity_info_new (); signon_identity_info_set_username (info, "James Bond"); signon_identity_info_set_secret (info, "007", TRUE); signon_identity_info_set_caption (info, "caption"); gchar *mechanisms[] = { "mechanism1", "mechanism2", "mechanism3", NULL }; signon_identity_info_set_method (info, "method1", (const gchar **)mechanisms); signon_identity_info_set_method (info, "method2", (const gchar **)mechanisms); signon_identity_info_set_method (info, "method3", (const gchar **)mechanisms); return info; }