Explorar el Código

chore(emqx_authn): update examples

Ilya Averyanov hace 3 años
padre
commit
f5d0e8ce84
Se han modificado 1 ficheros con 10 adiciones y 5 borrados
  1. 10 5
      apps/emqx_authn/src/emqx_authn_api.erl

+ 10 - 5
apps/emqx_authn/src/emqx_authn_api.erl

@@ -1335,7 +1335,8 @@ authenticator_examples() ->
                 backend => <<"built_in_database">>,
                 user_id_type => <<"username">>,
                 password_hash_algorithm => #{
-                    name => <<"sha256">>
+                    name => <<"sha256">>,
+                    salt_position => <<"suffix">>
                 }
             }
         },
@@ -1387,8 +1388,10 @@ authenticator_examples() ->
                 password_hash_field => <<"password_hash">>,
                 salt_field => <<"salt">>,
                 is_superuser_field => <<"is_superuser">>,
-                password_hash_algorithm => <<"sha256">>,
-                salt_position => <<"prefix">>
+                password_hash_algorithm => #{
+                    name => <<"sha256">>,
+                    salt_position => <<"suffix">>
+                }
             }
         },
         'password_based:redis' => #{
@@ -1399,8 +1402,10 @@ authenticator_examples() ->
                 server => <<"127.0.0.1:6379">>,
                 database => 0,
                 cmd => <<"HMGET ${username} password_hash salt">>,
-                password_hash_algorithm => <<"sha256">>,
-                salt_position => <<"prefix">>
+                password_hash_algorithm => #{
+                    name => <<"sha256">>,
+                    salt_position => <<"suffix">>
+                }
             }
         }
     }.