krähemann.com

AgsPasswordStore

AgsPasswordStore — password storage

Object Hierarchy

    GInterface
    ╰── AgsPasswordStore

Known Implementations

AgsPasswordStore is implemented by AgsXmlPasswordStore.

Includes

#include <ags/server/security/ags_password_store.h>

Description

The AgsPasswordStore interface gives you password storage.

Functions

ags_password_store_set_login_name ()

void
ags_password_store_set_login_name (AgsPasswordStore *password_store,
                                   GObject *security_context,
                                   gchar *user_uuid,
                                   gchar *security_token,
                                   gchar *login_name,
                                   GError **error);

Set login name.

Parameters

password_store

the AgsPasswordStore

 

security_context

the AgsSecurityContext

 

user_uuid

the users unique identifier

 

security_token

the security token

 

login_name

the login name

 

error

the GError

 

Since: 3.0.0


ags_password_store_get_login_name ()

gchar *
ags_password_store_get_login_name (AgsPasswordStore *password_store,
                                   GObject *security_context,
                                   gchar *user_uuid,
                                   gchar *security_token,
                                   GError **error);

Get login name.

Parameters

password_store

the AgsPasswordStore

 

security_context

the AgsSecurityContext

 

user_uuid

the users unique identifier

 

security_token

the security token

 

error

the GError

 

Returns

the login name.

[transfer full]

Since: 3.0.0


ags_password_store_set_password ()

void
ags_password_store_set_password (AgsPasswordStore *password_store,
                                 GObject *security_context,
                                 gchar *user_uuid,
                                 gchar *security_token,
                                 gchar *password,
                                 GError **error);

Set password.

Parameters

password_store

the AgsPasswordStore

 

security_context

the AgsSecurityContext

 

user_uuid

the user UUID

 

security_token

the security token

 

password

the password

 

error

the GError

 

Since: 3.0.0


ags_password_store_get_password ()

gchar *
ags_password_store_get_password (AgsPasswordStore *password_store,
                                 GObject *security_context,
                                 gchar *user_uuid,
                                 gchar *security_token,
                                 GError **error);

Get password.

Parameters

password_store

the AgsPasswordStore

 

security_context

the AgsSecurityContext

 

user_uuid

the user UUID

 

security_token

the security token

 

error

the GError

 

Returns

the password.

[transfer full]

Since: 3.0.0


ags_password_store_encrypt_password ()

gchar *
ags_password_store_encrypt_password (AgsPasswordStore *password_store,
                                     gchar *password,
                                     gchar *salt,
                                     GError **error);

Encrypt password.

Parameters

password_store

the AgsPasswordStore

 

password

the password

 

salt

your salt

 

error

the GError

 

Returns

the encrypted bytes.

[transfer full]

Since: 3.0.0


AGS_IS_PASSWORD_STORE()

#define AGS_IS_PASSWORD_STORE(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_PASSWORD_STORE))

AGS_IS_PASSWORD_STORE_INTERFACE()

#define AGS_IS_PASSWORD_STORE_INTERFACE(vtable)    (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_PASSWORD_STORE))

AGS_PASSWORD_STORE()

#define AGS_PASSWORD_STORE(obj)                    (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_PASSWORD_STORE, AgsPasswordStore))

AGS_PASSWORD_STORE_GET_INTERFACE()

#define AGS_PASSWORD_STORE_GET_INTERFACE(obj)      (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_PASSWORD_STORE, AgsPasswordStoreInterface))

AGS_PASSWORD_STORE_INTERFACE()

#define AGS_PASSWORD_STORE_INTERFACE(vtable)       (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_PASSWORD_STORE, AgsPasswordStoreInterface))

ags_password_store_get_type ()

GType
ags_password_store_get_type ();

Types and Values

AGS_TYPE_PASSWORD_STORE

#define AGS_TYPE_PASSWORD_STORE                    (ags_password_store_get_type())

AgsPasswordStore

typedef struct _AgsPasswordStore AgsPasswordStore;

struct AgsPasswordStoreInterface

struct AgsPasswordStoreInterface {
  GTypeInterface ginterface;

  void (*set_login_name)(AgsPasswordStore *password_store,
			 GObject *security_context,
			 gchar *user_uuid,
			 gchar *security_token,
			 gchar *login_name,
			 GError **error);
  gchar* (*get_login_name)(AgsPasswordStore *password_store,
			   GObject *security_context,
			   gchar *user_uuid,
			   gchar *security_token,
			   GError **error);

  void (*set_password)(AgsPasswordStore *password_store,
		       GObject *security_context,
		       gchar *user_uuid,
		       gchar *security_token,
		       gchar *password,
		       GError **error);
  gchar* (*get_password)(AgsPasswordStore *password_store,
			 GObject *security_context,
			 gchar *user_uuid,
			 gchar *security_token,
			 GError **error);

  gchar* (*encrypt_password)(AgsPasswordStore *password_store,
			     gchar *password,
			     gchar *salt,
			     GError **error);
};