|
@@ -347,7 +347,7 @@ test_authenticator_move(PathPrefix) ->
|
|
|
],
|
|
],
|
|
|
PathPrefix ++ [?CONF_NS]),
|
|
PathPrefix ++ [?CONF_NS]),
|
|
|
|
|
|
|
|
- % Invalid moves
|
|
|
|
|
|
|
+ %% Invalid moves
|
|
|
|
|
|
|
|
{ok, 400, _} = request(
|
|
{ok, 400, _} = request(
|
|
|
post,
|
|
post,
|
|
@@ -374,8 +374,9 @@ test_authenticator_move(PathPrefix) ->
|
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
|
#{position => <<"before:password_based:redis">>}),
|
|
#{position => <<"before:password_based:redis">>}),
|
|
|
|
|
|
|
|
- % Valid moves
|
|
|
|
|
|
|
+ %% Valid moves
|
|
|
|
|
|
|
|
|
|
+ %% test top
|
|
|
{ok, 204, _} = request(
|
|
{ok, 204, _} = request(
|
|
|
post,
|
|
post,
|
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
@@ -389,6 +390,7 @@ test_authenticator_move(PathPrefix) ->
|
|
|
],
|
|
],
|
|
|
PathPrefix ++ [?CONF_NS]),
|
|
PathPrefix ++ [?CONF_NS]),
|
|
|
|
|
|
|
|
|
|
+ %% test bottom
|
|
|
{ok, 204, _} = request(
|
|
{ok, 204, _} = request(
|
|
|
post,
|
|
post,
|
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
@@ -402,6 +404,7 @@ test_authenticator_move(PathPrefix) ->
|
|
|
],
|
|
],
|
|
|
PathPrefix ++ [?CONF_NS]),
|
|
PathPrefix ++ [?CONF_NS]),
|
|
|
|
|
|
|
|
|
|
+ %% test before
|
|
|
{ok, 204, _} = request(
|
|
{ok, 204, _} = request(
|
|
|
post,
|
|
post,
|
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
uri(PathPrefix ++ [?CONF_NS, "jwt", "move"]),
|
|
@@ -413,6 +416,20 @@ test_authenticator_move(PathPrefix) ->
|
|
|
#{<<"mechanism">> := <<"jwt">>},
|
|
#{<<"mechanism">> := <<"jwt">>},
|
|
|
#{<<"mechanism">> := <<"password_based">>, <<"backend">> := <<"built_in_database">>}
|
|
#{<<"mechanism">> := <<"password_based">>, <<"backend">> := <<"built_in_database">>}
|
|
|
],
|
|
],
|
|
|
|
|
+ PathPrefix ++ [?CONF_NS]),
|
|
|
|
|
+
|
|
|
|
|
+ %% test after
|
|
|
|
|
+ {ok, 204, _} = request(
|
|
|
|
|
+ post,
|
|
|
|
|
+ uri(PathPrefix ++ [?CONF_NS, "password_based%3Abuilt_in_database", "move"]),
|
|
|
|
|
+ #{position => <<"after:password_based:http">>}),
|
|
|
|
|
+
|
|
|
|
|
+ ?assertAuthenticatorsMatch(
|
|
|
|
|
+ [
|
|
|
|
|
+ #{<<"mechanism">> := <<"password_based">>, <<"backend">> := <<"http">>},
|
|
|
|
|
+ #{<<"mechanism">> := <<"password_based">>, <<"backend">> := <<"built_in_database">>},
|
|
|
|
|
+ #{<<"mechanism">> := <<"jwt">>}
|
|
|
|
|
+ ],
|
|
|
PathPrefix ++ [?CONF_NS]).
|
|
PathPrefix ++ [?CONF_NS]).
|
|
|
|
|
|
|
|
test_authenticator_import_users(PathPrefix) ->
|
|
test_authenticator_import_users(PathPrefix) ->
|