docs(authn): use a string alias for user_id_type

This commit is contained in:
Zaiming (Stone) Shi 2022-05-09 23:45:38 +02:00
parent 0924c7dc13
commit 57c1c418d6
2 changed files with 7 additions and 7 deletions

View File

@ -1,20 +1,20 @@
emqx_authn_mnesia { emqx_authn_mnesia {
authentication { authentication {
desc { desc {
en: """Configuration of authenticator using built-in database as authentication data source.""" en: """Configuration of authenticator using built-in database as data source."""
zh: """使用内置数据库作为认证数据源的认证器的配置项。""" zh: """使用内置数据库作为认证数据源的认证器的配置项。"""
} }
} }
user_id_type { user_id_type {
desc { desc {
en: """Specify whether to use ClientID or Username as User ID for authentication.""" en: """Specify whether to use `clientid` or `username` for authentication."""
zh: """指定使用 ClientID 还是 Username 作为 User ID 进行认证。""" zh: """指定使用客户端ID `clientid` 还是用户名 `username` 进行认证。"""
} }
label: { label: {
en: """User ID Type""" en: """Authentication ID Type"""
zh: """用户 ID 类型""" zh: """认证 ID 类型"""
} }
} }

View File

@ -115,7 +115,7 @@ desc(?CONF_NS) ->
desc(_) -> desc(_) ->
undefined. undefined.
user_id_type(type) -> user_id_type(); user_id_type(type) -> typerefl:alias("string", user_id_type());
user_id_type(desc) -> ?DESC(?FUNCTION_NAME); user_id_type(desc) -> ?DESC(?FUNCTION_NAME);
user_id_type(default) -> <<"username">>; user_id_type(default) -> <<"username">>;
user_id_type(required) -> true; user_id_type(required) -> true;