fix(authn): rename config key http-server to http
This commit is contained in:
parent
019b9d17f6
commit
d468c21e61
|
@ -28,8 +28,7 @@ providers() ->
|
||||||
, {{'password-based', postgresql}, emqx_authn_pgsql}
|
, {{'password-based', postgresql}, emqx_authn_pgsql}
|
||||||
, {{'password-based', mongodb}, emqx_authn_mongodb}
|
, {{'password-based', mongodb}, emqx_authn_mongodb}
|
||||||
, {{'password-based', redis}, emqx_authn_redis}
|
, {{'password-based', redis}, emqx_authn_redis}
|
||||||
, {{'password-based', 'http-server'}, emqx_authn_http}
|
, {{'password-based', 'http'}, emqx_authn_http}
|
||||||
, {{'password-based', 'http'}, emqx_authn_http} %% TODO: resolve one
|
|
||||||
, {jwt, emqx_authn_jwt}
|
, {jwt, emqx_authn_jwt}
|
||||||
, {{scram, 'built-in-database'}, emqx_enhanced_authn_scram_mnesia}
|
, {{scram, 'built-in-database'}, emqx_enhanced_authn_scram_mnesia}
|
||||||
].
|
].
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
}}).
|
}}).
|
||||||
|
|
||||||
-define(EXAMPLE_2, #{mechanism => <<"password-based">>,
|
-define(EXAMPLE_2, #{mechanism => <<"password-based">>,
|
||||||
backend => <<"http-server">>,
|
backend => <<"http">>,
|
||||||
method => <<"post">>,
|
method => <<"post">>,
|
||||||
url => <<"http://localhost:80/login">>,
|
url => <<"http://localhost:80/login">>,
|
||||||
headers => #{
|
headers => #{
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
-define(INSTANCE_EXAMPLE_1, maps:merge(?EXAMPLE_1, #{id => <<"password-based:built-in-database">>,
|
-define(INSTANCE_EXAMPLE_1, maps:merge(?EXAMPLE_1, #{id => <<"password-based:built-in-database">>,
|
||||||
enable => true})).
|
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",
|
connect_timeout => "5s",
|
||||||
enable_pipelining => true,
|
enable_pipelining => true,
|
||||||
headers => #{
|
headers => #{
|
||||||
|
@ -1506,8 +1506,8 @@ definitions() ->
|
||||||
},
|
},
|
||||||
backend => #{
|
backend => #{
|
||||||
type => string,
|
type => string,
|
||||||
enum => [<<"http-server">>],
|
enum => [<<"http">>],
|
||||||
example => <<"http-server">>
|
example => <<"http">>
|
||||||
},
|
},
|
||||||
method => #{
|
method => #{
|
||||||
type => string,
|
type => string,
|
||||||
|
|
|
@ -61,8 +61,8 @@ fields(post) ->
|
||||||
] ++ common_fields().
|
] ++ common_fields().
|
||||||
|
|
||||||
common_fields() ->
|
common_fields() ->
|
||||||
[ {mechanism, {enum, ['password-based']}}
|
[ {mechanism, 'password-based'}
|
||||||
, {backend, {enum, ['http-server', 'http']}} %% TODO: delete http
|
, {backend, 'http'}
|
||||||
, {url, fun url/1}
|
, {url, fun url/1}
|
||||||
, {body, fun body/1}
|
, {body, fun body/1}
|
||||||
, {request_timeout, fun request_timeout/1}
|
, {request_timeout, fun request_timeout/1}
|
||||||
|
|
Loading…
Reference in New Issue