For more information on the internal authentication backend and usage examples see Internal Backend.
More...
For more information on the internal authentication backend and usage examples see Internal Backend.
◆ ua_authentication_add_user()
int ua_authentication_add_user |
( |
uint8_t |
hash_alg, |
|
|
const char * |
username, |
|
|
const char * |
salt, |
|
|
const char * |
hash |
|
) |
| |
Add a user to authentication.
For an example how to use this function see Code.
- Parameters
-
hash_alg | Hash algorithm to use e.g. UA_AUTH_HASH_SHA256. |
username | Name of the user add. |
salt | Salt to hash the password with. |
hash | The password hash as hexadecimal string. |
- Returns
- Zero on success or errorcode on failure.
◆ ua_authentication_check_password()
Check the password for a user.
- Parameters
-
username | Name of the user. |
password | Cleartext password the user provided. |
- Returns
- Zero if the password is correct, bad statuscode otherwise.
◆ ua_authentication_remove_user()
int ua_authentication_remove_user |
( |
const char * |
username | ) |
|
Remove a user from authentication.
- Parameters
-
username | Name of the user to remove. |
- Returns
- Zero on success or errorcode on failure.
◆ ua_authentication_user_exists()
bool ua_authentication_user_exists |
( |
const struct ua_string * |
username | ) |
|
Check if a user exists for authentication.
- Parameters
-
username | Name of the user. |
- Returns
- True if user exists, false otherwise.
◆ ua_authorization_write_to_filestream()
int ua_authorization_write_to_filestream |
( |
struct ua_filestream * |
stream | ) |
|
Write current users with passwords to a filedescriptor.
- Parameters
-
stream | File stream to write information to. |
- Returns
- Zero on success or errorcode on failure.