Commit Graph

29 Commits

Author SHA1 Message Date
Zaiming Shi 6354e75626 chore: update copyrights 2021-04-23 20:43:00 +02:00
Zaiming Shi 7aff861f9b refactor(emqx_modules): Move emqx_modules to lib-opensource
emqx_moduels for enterprise is refactored as a lib/plugin
in order to avoid merge conflicts, we make sure they can
co-exist in the same branch, because lib-opensource is compiled
in opensource project and lib-enterprise (to be added) is
compiled in enterprise project
2021-02-08 21:35:44 +01:00
JianBo He 9e6966110d
Move emqx_delay_publish here (#3323)
Move emqx_delay_publish here
2020-03-26 18:32:24 +08:00
zhouzb 7ea75f4289 Update copyright 2020-01-03 18:31:08 +08:00
zhanghongtong 1072536382 Add more test cases for emqx_sup 2019-11-13 18:30:02 +08:00
Feng Lee 6e18f8543d Add emqx_boot module 2019-09-06 17:36:13 +08:00
Feng Lee 8c37ea3f38 Fix conflict 2019-07-02 14:02:42 +08:00
Gilbert 9df6345a6c Remove bridge functions from emqx (#2652)
* Remove bridge functions from emqx
2019-06-26 19:33:17 +08:00
Feng Lee 21162f88b8 Update copyright 2019-06-18 14:27:06 +08:00
HeeeJianBo fc2df9aff5 Adapt to new export style 2019-03-22 14:58:24 +08:00
Shawn 02fe8560e2
Improve emqx_hooks and credentials (#2309)
* Improve emqx_hooks and credentials

1. Modify the return modes of emqx hooks.

Change the return value of hook functions to:
- ok: stop the hook chain and return ok
- {error, Reason}: stop the hook chain and return error
- continue: continue the hook chain

And the return value of emqx_hooks:run/2 is changed to:
- ok
- {error, Reason}

And the return value of emqx_hooks:run/3:
- {ok, Acc}
- {error, Reason, Acc}

2. Treat password as a member of credentials.

Password should be wrapped in the `credentials` data-structure, as the
username/password pair together consists of an authentication method.
There can be some methods using some other credential data (e.g.
a JWT token), and these credential data should also be wrapped in the
the `credentials` data-structure.

An event `client.authenticate` is triggered when an user logs in:
```erlang
emqx_hooks:run('client.authenticate', [], Credentials)
```

A `default callback` that deny/allow any user (according to the
`allow_anonymous` config) should be appended to the end of the
callback chain.

The `credentails` is passed through all of the callbacks, and
can be changed over in this process.

* Refactor emqx hooks return mode

* Remove password from PState
2019-03-16 10:43:53 +08:00
Gilbert Wong 7efd7b3ec0 Rename portal to bridge 2019-02-28 15:31:54 +08:00
spring2maz fbe67e6784 Introduce new bridge impl 2019-02-28 11:17:27 +08:00
turtled 31e95b56c4 Update Copyright to 2019 2019-01-29 10:43:25 +08:00
Feng Lee 4aaf0a7db4 Remove emqx_session_sup to handle massive concurrent sessions 2018-12-13 17:10:02 +08:00
turtled d3ed0853ef Rename bridge module 2018-08-30 10:41:04 +08:00
turtled 22e8b07a3d Receive/send messages by bridge 2018-08-19 20:31:44 +08:00
Feng Lee f80cd2d986 Improve the MQTT over Websocket connection 2018-08-11 17:57:19 +08:00
turtled 4d9e03a803 Refactor websocket conn using cowboy 2018-08-08 18:36:14 +08:00
Feng Lee 7ee54aac28 Add 'qos' field to message record 2018-07-18 23:41:00 +08:00
Feng Lee 2a4ffc6645 Add more service modules for MQTT Version 5.0 2018-04-18 16:34:23 +08:00
Feng Lee 71acf91ace Replace lager with emqx_log 2018-04-09 12:34:53 +08:00
Feng Lee bfb23ff0b2 Improve the design of MQTT session management 2018-04-08 15:16:05 +08:00
Feng Lee 9976327c8d Add emqx_mqtt module 2018-03-23 18:13:09 +08:00
Feng Lee 56b88dd7f7 Improve the design of session management 2018-03-23 16:39:23 +08:00
Feng Lee 282e341433 EMQ X R3.0 - Improve the design of pubsub and router 2018-03-21 16:48:52 +08:00
Feng Lee 6a957e1b33 Support MQTT Version 5.0 2018-03-02 20:18:27 +08:00
Feng Lee 735211fd02 Merge with EMQ X project 2017-10-09 23:29:05 +08:00
Feng Lee 4b8cd18f5d Merge with EMQ X project 2017-10-09 19:43:06 +08:00