Diffusion C API
5.9.24
|
Functions | |
SYSTEM_AUTHENTICATION_STORE_T * | system_authentication_store_create (void) |
Create a new, empty system authentication store structure. More... | |
void | system_authentication_store_free (SYSTEM_AUTHENTICATION_STORE_T *store) |
Free all memory associated with a system authentication store structure. More... | |
SYSTEM_AUTHENTICATION_STORE_T * | system_authentication_store_dup (const SYSTEM_AUTHENTICATION_STORE_T *store) |
Copy an existing system authentication store structure. More... | |
void | get_system_authentication_store (SESSION_T *session, const GET_SYSTEM_AUTHENTICATION_STORE_PARAMS_T params) |
Get the server's system authentication store. More... | |
char ** | get_principal_names (const SYSTEM_AUTHENTICATION_STORE_T store) |
Get an array of principals defined in the system authentication store. More... | |
char ** | get_roles_for_principal (const SYSTEM_AUTHENTICATION_STORE_T store, const char *principal) |
Get an array of role names for a given principal. More... | |
char ** | get_anonymous_roles (const SYSTEM_AUTHENTICATION_STORE_T store) |
Get an array of role names for anonymous connections. More... | |
void | update_system_authentication_store (SESSION_T *session, const UPDATE_SYSTEM_AUTHENTICATION_STORE_PARAMS_T params) |
Send updates to the system authentication store. More... | |
SCRIPT_T * | update_auth_store_deny_anonymous_connections (SCRIPT_T *script) |
Updates a script to add a command to deny anonymous connections. More... | |
SCRIPT_T * | update_auth_store_abstain_anonymous_connections (SCRIPT_T *script) |
Updates a script to add a command to abstain from decisions relating to anonymous connections. More... | |
SCRIPT_T * | update_auth_store_allow_anonymous_connections (SCRIPT_T *script, const LIST_T *roles) |
Updates a script to add a command to allow anonymous connections, and a list of roles those connections should have. More... | |
SCRIPT_T * | update_auth_store_add_principal (SCRIPT_T *script, const char *principal, const char *password, const LIST_T *roles) |
Updates a script to add a command to add a new principal to the authentication store, and a list of roles assigned to them. More... | |
SCRIPT_T * | update_auth_store_remove_principal (SCRIPT_T *script, const char *principal) |
Updates a script to add a command to remove an existing principal from the authentication store. More... | |
SCRIPT_T * | update_auth_store_assign_roles (SCRIPT_T *script, const char *principal, const LIST_T *roles) |
Updates a script to assign roles to an existing principal. More... | |
SCRIPT_T * | update_auth_store_set_password (SCRIPT_T *script, const char *principal, const char *password) |
Updates a script to change the password for an existing principal. More... | |
SCRIPT_T * | update_auth_store_verify_password (SCRIPT_T *script, const char *principal, const char *password) |
Updates a script to include a command to verify a principal's password. More... | |
char** get_anonymous_roles | ( | const SYSTEM_AUTHENTICATION_STORE_T | store | ) |
Get an array of role names for anonymous connections.
store | A system authentication store. |
char** get_principal_names | ( | const SYSTEM_AUTHENTICATION_STORE_T | store | ) |
Get an array of principals defined in the system authentication store.
store | A system authentication store. |
char** get_roles_for_principal | ( | const SYSTEM_AUTHENTICATION_STORE_T | store, |
const char * | principal | ||
) |
Get an array of role names for a given principal.
store | A system authentication store. |
principal | The principal for which roles are requested. |
void get_system_authentication_store | ( | SESSION_T * | session, |
const GET_SYSTEM_AUTHENTICATION_STORE_PARAMS_T | params | ||
) |
Get the server's system authentication store.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure containing callbacks to receive the contents of the system authentication store. |
SYSTEM_AUTHENTICATION_STORE_T* system_authentication_store_create | ( | void | ) |
Create a new, empty system authentication store structure.
The returned structure is unsynchronized, so appropriate mutexes should be use if the structure is to be used concurrently.
SYSTEM_AUTHENTICATION_STORE_T* system_authentication_store_dup | ( | const SYSTEM_AUTHENTICATION_STORE_T * | store | ) |
Copy an existing system authentication store structure.
store | The system authentication store to be copied. |
The returned structure is unsynchronized, so appropriate mutexes should be use if the structure is to be used concurrently.
void system_authentication_store_free | ( | SYSTEM_AUTHENTICATION_STORE_T * | store | ) |
Free all memory associated with a system authentication store structure.
store | The system authentication store to be freed. |
Updates a script to add a command to abstain from decisions relating to anonymous connections.
script | The script to update. |
SCRIPT_T* update_auth_store_add_principal | ( | SCRIPT_T * | script, |
const char * | principal, | ||
const char * | password, | ||
const LIST_T * | roles | ||
) |
Updates a script to add a command to add a new principal to the authentication store, and a list of roles assigned to them.
script | The script to update. |
principal | The principal to add. |
password | The unencoded password for the principal. |
roles | A list of strings representing the roles to be assigned to the principal. |
Updates a script to add a command to allow anonymous connections, and a list of roles those connections should have.
script | The script to update. |
roles | A list of strings representing the roles to be assigned to the anonymous user. |
SCRIPT_T* update_auth_store_assign_roles | ( | SCRIPT_T * | script, |
const char * | principal, | ||
const LIST_T * | roles | ||
) |
Updates a script to assign roles to an existing principal.
script | The script to update. |
principal | The principal whose roles are to be updated. |
roles | A list of strings representing the roles to be assigned to the principal. |
Updates a script to add a command to deny anonymous connections.
script | The script to update. |
Updates a script to add a command to remove an existing principal from the authentication store.
script | The script to update. |
principal | The principal to remove. |
SCRIPT_T* update_auth_store_set_password | ( | SCRIPT_T * | script, |
const char * | principal, | ||
const char * | password | ||
) |
Updates a script to change the password for an existing principal.
script | The script to update. |
principal | The principal whose password is to be changed. |
password | The unencoded password for the principal. |
SCRIPT_T* update_auth_store_verify_password | ( | SCRIPT_T * | script, |
const char * | principal, | ||
const char * | password | ||
) |
Updates a script to include a command to verify a principal's password.
This command does not update the store. It can be used in conjunction with setPassword to create a script that updates a password only if the previous password is supplied.
script | The script to update. |
principal | The principal whose password is to be verified. |
password | The unencoded password for the principal. |
void update_system_authentication_store | ( | SESSION_T * | session, |
const UPDATE_SYSTEM_AUTHENTICATION_STORE_PARAMS_T | params | ||
) |
Send updates to the system authentication store.
session | The current session. If NULL, this function returns immediately. |
params | Parameter structure describing the updates to perform and callbacks to handle success or failure notifications. |