GSignondCredentials

GSignondCredentials — credentials (username, password) associated with an identity

Synopsis

#include <gsignond/gsignond-credentials.h>

                    GSignondCredentials;
                    GSignondCredentialsClass;
gboolean            gsignond_credentials_equal          (GSignondCredentials *one,
                                                         GSignondCredentials *two);
guint32             gsignond_credentials_get_id         (GSignondCredentials *self);
const gchar *       gsignond_credentials_get_password   (GSignondCredentials *self);
const gchar *       gsignond_credentials_get_username   (GSignondCredentials *self);
GSignondCredentials * gsignond_credentials_new          ();
gboolean            gsignond_credentials_set_data       (GSignondCredentials *self,
                                                         const guint32 id,
                                                         const gchar *username,
                                                         const gchar *password);
gboolean            gsignond_credentials_set_id         (GSignondCredentials *self,
                                                         const guint32 id);
gboolean            gsignond_credentials_set_password   (GSignondCredentials *self,
                                                         const gchar *password);
gboolean            gsignond_credentials_set_username   (GSignondCredentials *self,
                                                         const gchar *username);

Object Hierarchy

  GObject
   +----GSignondCredentials

Description

GSignondCredentials hold a username, password, and identity id, associated with an identity. This information in stored in secret storage using GSignondSecretStorage.

Details

GSignondCredentials

typedef struct _GSignondCredentials GSignondCredentials;

Opaque GSignondCredentials data structure.


GSignondCredentialsClass

typedef struct {
} GSignondCredentialsClass;

Opaque GSignondCredentialsClass data structure.


gsignond_credentials_equal ()

gboolean            gsignond_credentials_equal          (GSignondCredentials *one,
                                                         GSignondCredentials *two);

Compares elements of two GSignondCredentials object for equality.

one :

the first credential to be compared.

two :

the second credential to be compared.

Returns :

TRUE if id, username and password are same for both credential objects, FALSE otherwise.

gsignond_credentials_get_id ()

guint32             gsignond_credentials_get_id         (GSignondCredentials *self);

Gets the identity id

self :

the object whose id is to be set.

Returns :

the id

gsignond_credentials_get_password ()

const gchar *       gsignond_credentials_get_password   (GSignondCredentials *self);

Gets the password from the GSignondCredentials object

self :

the object whose password is to be set.

Returns :

the password if the object is valid, NULL otherwise. [transfer none]

gsignond_credentials_get_username ()

const gchar *       gsignond_credentials_get_username   (GSignondCredentials *self);

Gets the username of the GSignondCredentials object

self :

the object whose username is to be set.

Returns :

the username if the object is valid, NULL otherwise. [transfer none]

gsignond_credentials_new ()

GSignondCredentials * gsignond_credentials_new          ();

Creates a new empty GSignondCredentials object

Returns :

the GSignondCredentials object. [transfer full]

gsignond_credentials_set_data ()

gboolean            gsignond_credentials_set_data       (GSignondCredentials *self,
                                                         const guint32 id,
                                                         const gchar *username,
                                                         const gchar *password);

Sets the data of the GSignondCredentials.

self :

the object whose data is to be set.

id :

the identity id associated with the credentials.

username :

the username. [transfer none]

password :

the password. [transfer none]

Returns :

TRUE if successful, FALSE otherwise.

gsignond_credentials_set_id ()

gboolean            gsignond_credentials_set_id         (GSignondCredentials *self,
                                                         const guint32 id);

Sets the identity id of the GSignondCredentials object

self :

the object whose id is to be set.

id :

the id.

Returns :

TRUE if successful, FALSE otherwise.

gsignond_credentials_set_password ()

gboolean            gsignond_credentials_set_password   (GSignondCredentials *self,
                                                         const gchar *password);

Sets the password of the GSignondCredentials object

self :

the object whose password is to be set.

password :

the password. [transfer none]

Returns :

TRUE if successful, FALSE otherwise.

gsignond_credentials_set_username ()

gboolean            gsignond_credentials_set_username   (GSignondCredentials *self,
                                                         const gchar *username);

Sets the username of the GSignondCredentials object

self :

the object whose username is to be set.

username :

the username. [transfer none]

Returns :

TRUE if successful, FALSE otherwise.