AgsPasswordStore

AgsPasswordStore — password storage

Functions

Types and Values

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: 1.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

Since: 1.0.0


ags_password_store_set_password ()

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

Set login name.

Parameters

password_store

the AgsPasswordStore

 

security_context

the AgsSecurityContext

 

login

the login

 

security_token

the security token

 

password

the password

 

error

the GError

 

Since: 1.0.0


ags_password_store_get_password ()

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

Get login name.

Parameters

password_store

the AgsPasswordStore

 

security_context

the AgsSecurityContext

 

login

the login

 

security_token

the security token

 

error

the GError

 

Returns

the password

Since: 1.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

Since: 1.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

enum AgsSecurityContextMode

The AgsSecurityContextMode specifies basic account permissions.

Members

AGS_SECURITY_CONTEXT_RPC_READ

allowed to read using RPC

 

AGS_SECURITY_CONTEXT_RPC_WRITE

allowed to write using RPC

 

AGS_SECURITY_CONTEXT_RPC_EXECUTE

allowed to execute using RPC

 

AGS_SECURITY_CONTEXT_ACCOUNT_READ

allowed to read account information

 

AGS_SECURITY_CONTEXT_ACCOUNT_WRITE

allowed to write account information

 

AGS_TYPE_PASSWORD_STORE

#define AGS_TYPE_PASSWORD_STORE                    (ags_password_store_get_type())

AgsPasswordStore

typedef struct _AgsPasswordStore AgsPasswordStore;

struct AgsPasswordStoreInterface

struct AgsPasswordStoreInterface {
  GTypeInterface interface;

  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 *login,
		       gchar *security_token,
		       gchar *password,
		       GError **error);
  gchar* (*get_password)(AgsPasswordStore *password_store,
			 GObject *security_context,
			 gchar *login,
			 gchar *security_token,
			 GError **error);
  
  gchar* (*encrypt_password)(AgsPasswordStore *password_store,
			     gchar *password,
			     gchar *salt,
			     GError **error);
};