|
Greenbone Security Assistant
8.0.0
|
GSAD user session handling. More...


Go to the source code of this file.
Functions | |
| void | session_add_user (const gchar *id, user_t *user) |
| Add user to the session "database". More... | |
| void | session_remove_user (const gchar *id) |
| Remove a user from the session "database". More... | |
| user_t * | session_get_user_by_id (const gchar *id) |
| user_t * | session_get_user_by_username (const gchar *username) |
| void | session_remove_other_sessions (const gchar *id, user_t *user) |
| Removes all session of the user, except the one with the passed id. More... | |
| void | session_init () |
GSAD user session handling.
Definition in file gsad_session.h.
| void session_add_user | ( | const gchar * | id, |
| user_t * | user | ||
| ) |
Add user to the session "database".
| [in] | id | Unique identifier. |
| [in] | user | User. |
Definition at line 147 of file gsad_session.c.
References mutex, session_add_user_internal(), and session_remove_user_internal().
Referenced by renew_session_gmp(), save_my_settings_gmp(), user_add(), and user_find().


| user_t* session_get_user_by_id | ( | const gchar * | id | ) |
Find a user by a session identifier
Definition at line 97 of file gsad_session.c.
References mutex, session_get_user_by_id_internal(), and user_copy().
Referenced by user_find(), and user_logout().


| user_t* session_get_user_by_username | ( | const gchar * | username | ) |
Find the first user with the username
Definition at line 116 of file gsad_session.c.
References mutex, str_equal(), user_copy(), user_get_username(), and users.
Referenced by save_user_gmp(), and user_add().


| void session_init | ( | ) |
Definition at line 84 of file gsad_session.c.
| void session_remove_other_sessions | ( | const gchar * | id, |
| user_t * | user | ||
| ) |
Removes all session of the user, except the one with the passed id.
| [in] | id | ID of the session to keep |
| [in] | user | The user to logout. |
Definition at line 181 of file gsad_session.c.
References mutex, str_equal(), user_free(), user_get_token(), user_get_username(), and users.
Referenced by save_my_settings_gmp(), and save_user_gmp().


| void session_remove_user | ( | const gchar * | id | ) |
Remove a user from the session "database".
| [in] | id | Unique identifier. |
Definition at line 164 of file gsad_session.c.
References mutex, and session_remove_user_internal().
Referenced by user_add(), user_find(), and user_logout().

