New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rest api #78
Add rest api #78
Conversation
Please update ReadMe |
Makefile
Outdated
|
||
BUILD_DEPS = emqx cuttlefish | ||
BUILD_DEPS = emqx cuttlefish emqx_management |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dep for emqx_management
src/emqx_auth_clientid_api.erl
Outdated
|
||
format([{?APP, ClientId, Password}]) -> | ||
[{clientid, ClientId}, | ||
{password, emqx_auth_clientid:unwap_salt(Password)}]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unwap_salt -> unwrap_salt
src/emqx_auth_clientid.erl
Outdated
@@ -28,6 +28,7 @@ | |||
|
|||
-export([ init/1 | |||
, check/2 | |||
, unwarp_salt/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unwrap
src/emqx_auth_clientid.erl
Outdated
@@ -149,6 +150,9 @@ check(Credentials = #{client_id := ClientId, password := Password}, #{hash_type | |||
end | |||
end. | |||
|
|||
unwarp_salt(<<_Salt:4/binary, HashPasswd/binary>>) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unwarp_salt -> unwrap_salt
src/emqx_auth_clientid_api.erl
Outdated
%%------------------------------------------------------------------------------ | ||
|
||
return() -> | ||
emqx_mgmt:return(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Replace this fun with
minirest:return/x
- Update the minirest dependency to v0.2.2
Makefile
Outdated
dep_emqx_passwd = git-emqx https://github.com/emqx/emqx-passwd v1.0 | ||
dep_clique = git-emqx https://github.com/emqx/clique v0.3.11 | ||
dep_minirest = git-emqx https://github.com/emqx/minirest v0.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v0.2.0 -> v0.2.2
README.md
Outdated
|
||
List all clientids | ||
``` | ||
#Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space between '#' and 'Request'
src/emqx_auth_clientid.erl
Outdated
@@ -28,6 +28,7 @@ | |||
|
|||
-export([ init/1 | |||
, check/2 | |||
, unwrap_salt/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move unwrap_salt/1 to single export
Description
Add rest api for support
clientid CURD
and add rest api test case, Introducingemqx_ct_helper
in the test cases.