fix(undefined function): fix undefined function

This commit is contained in:
zhouzb 2021-08-19 15:01:44 +08:00
parent 87051c0e53
commit e6c01cb6e6
1 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@ update_user(UserID, User,
undefined -> undefined ->
UserInfo1; UserInfo1;
Password -> Password ->
{StoredKey, ServerKey, Salt} = esasl_scram:generate_user_credential(Password, State), {StoredKey, ServerKey, Salt} = esasl_scram:generate_authentication_info(Password, State),
UserInfo1#user_info{stored_key = StoredKey, UserInfo1#user_info{stored_key = StoredKey,
server_key = ServerKey, server_key = ServerKey,
salt = Salt} salt = Salt}
@ -239,7 +239,7 @@ check_client_final_message(Bin, #{superuser := Superuser} = Cache, #{algorithm :
end. end.
add_user(UserID, Password, Superuser, State) -> add_user(UserID, Password, Superuser, State) ->
{StoredKey, ServerKey, Salt} = esasl_scram:generate_user_credential(Password, State), {StoredKey, ServerKey, Salt} = esasl_scram:generate_authentication_info(Password, State),
UserInfo = #user_info{user_id = UserID, UserInfo = #user_info{user_id = UserID,
stored_key = StoredKey, stored_key = StoredKey,
server_key = ServerKey, server_key = ServerKey,