GSignondCredentials

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

Functions

Includes

#include <gsignond/gsignond-credentials.h>

Description

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

Functions

gsignond_credentials_new ()

GSignondCredentials *
gsignond_credentials_new (void);

Creates a new empty GSignondCredentials object

Returns

the GSignondCredentials object


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.

Parameters

self

the object whose data is to be set.

 

id

the identity id associated with the credentials.

 

username

the username.

 

password

the password.

 

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

Parameters

self

the object whose id is to be set.

 

id

the id.

 

Returns

TRUE if successful, FALSE otherwise.


gsignond_credentials_get_id ()

guint32
gsignond_credentials_get_id (GSignondCredentials *self);

Gets the identity id

Parameters

self

the object whose id is to be set.

 

Returns

the id


gsignond_credentials_set_username ()

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

Sets the username of the GSignondCredentials object

Parameters

self

the object whose username is to be set.

 

username

the username.

[nullable]

Returns

TRUE if successful, FALSE otherwise.


gsignond_credentials_get_username ()

const gchar *
gsignond_credentials_get_username (GSignondCredentials *self);

Gets the username of the GSignondCredentials object

Parameters

self

the object whose username is to be set.

 

Returns

the username if the object is valid, NULL otherwise.

[nullable]


gsignond_credentials_set_password ()

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

Sets the password of the GSignondCredentials object

Parameters

self

the object whose password is to be set.

 

password

the password.

[nullable]

Returns

TRUE if successful, FALSE otherwise.


gsignond_credentials_get_password ()

const gchar *
gsignond_credentials_get_password (GSignondCredentials *self);

Gets the password from the GSignondCredentials object

Parameters

self

the object whose password is to be set.

 

Returns

the password if the object is valid, NULL otherwise.

[nullable]


gsignond_credentials_equal ()

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

Compares elements of two GSignondCredentials object for equality.

Parameters

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.

Types and Values