fix(authn): rename config key http-server to http

This commit is contained in:
Zaiming Shi 2021-10-20 14:36:37 +02:00 committed by x1001100011
parent c0364ad5a2
commit 1c22c0d596
3 changed files with 7 additions and 8 deletions

View File

@ -28,8 +28,7 @@ providers() ->
, {{'password-based', postgresql}, emqx_authn_pgsql}
, {{'password-based', mongodb}, emqx_authn_mongodb}
, {{'password-based', redis}, emqx_authn_redis}
, {{'password-based', 'http-server'}, emqx_authn_http}
, {{'password-based', 'http'}, emqx_authn_http} %% TODO: resolve one
, {{'password-based', 'http'}, emqx_authn_http}
, {jwt, emqx_authn_jwt}
, {{scram, 'built-in-database'}, emqx_enhanced_authn_scram_mnesia}
].

View File

@ -43,7 +43,7 @@
}}).
-define(EXAMPLE_2, #{mechanism => <<"password-based">>,
backend => <<"http-server">>,
backend => <<"http">>,
method => <<"post">>,
url => <<"http://localhost:80/login">>,
headers => #{
@ -90,7 +90,7 @@
-define(INSTANCE_EXAMPLE_1, maps:merge(?EXAMPLE_1, #{id => <<"password-based:built-in-database">>,
enable => true})).
-define(INSTANCE_EXAMPLE_2, maps:merge(?EXAMPLE_2, #{id => <<"password-based:http-server">>,
-define(INSTANCE_EXAMPLE_2, maps:merge(?EXAMPLE_2, #{id => <<"password-based:http">>,
connect_timeout => "5s",
enable_pipelining => true,
headers => #{
@ -1506,8 +1506,8 @@ definitions() ->
},
backend => #{
type => string,
enum => [<<"http-server">>],
example => <<"http-server">>
enum => [<<"http">>],
example => <<"http">>
},
method => #{
type => string,

View File

@ -61,8 +61,8 @@ fields(post) ->
] ++ common_fields().
common_fields() ->
[ {mechanism, {enum, ['password-based']}}
, {backend, {enum, ['http-server', 'http']}} %% TODO: delete http
[ {mechanism, 'password-based'}
, {backend, 'http'}
, {url, fun url/1}
, {body, fun body/1}
, {request_timeout, fun request_timeout/1}