#[no_mangle]
pub unsafe extern "C" fn teaclave_user_login(
    client: &mut AuthenticationClient,
    user_id: *const c_char,
    user_password: *const c_char,
    token: *mut c_char,
    token_len: *mut size_t
) -> c_int
Expand description

Login a new user with user_id and user_password. The login session token will be save in the token buffer, and length will be set in the token_len argument. The function returns 0 for success. On error, the function returns 1.

Safety

user_id, user_password should be C string (null terminated), token and token_len should be consistent.