Skip to content
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

Merged
merged 8 commits into from Apr 1, 2019
Merged

Add rest api #78

merged 8 commits into from Apr 1, 2019

Conversation

linjunjj
Copy link
Contributor

Description

Add rest api for support clientid CURD and add rest api test case, Introducing emqx_ct_helper in the test cases.

@tigercl
Copy link
Member

tigercl commented Mar 30, 2019

Please update ReadMe

Makefile Outdated

BUILD_DEPS = emqx cuttlefish
BUILD_DEPS = emqx cuttlefish emqx_management
Copy link
Member

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


format([{?APP, ClientId, Password}]) ->
[{clientid, ClientId},
{password, emqx_auth_clientid:unwap_salt(Password)}].
Copy link
Member

@tigercl tigercl Mar 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwap_salt -> unwrap_salt

@@ -28,6 +28,7 @@

-export([ init/1
, check/2
, unwarp_salt/1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwrap

@@ -149,6 +150,9 @@ check(Credentials = #{client_id := ClientId, password := Password}, #{hash_type
end
end.

unwarp_salt(<<_Salt:4/binary, HashPasswd/binary>>) ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwarp_salt -> unwrap_salt

%%------------------------------------------------------------------------------

return() ->
emqx_mgmt:return().
Copy link
Member

@HJianBo HJianBo Mar 31, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Replace this fun with minirest:return/x
  2. 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
Copy link
Member

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
Copy link
Member

@tigercl tigercl Apr 1, 2019

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'

@@ -28,6 +28,7 @@

-export([ init/1
, check/2
, unwrap_salt/1
Copy link
Member

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

@HJianBo HJianBo merged commit 3834314 into develop Apr 1, 2019
@HJianBo HJianBo deleted the add_http_api branch April 1, 2019 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants