• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

emqx / emqx / 5038
85%
master: 82%

Build:
Build:
LAST BUILD BRANCH: bump-emqx-enterprise-dashboard-version-20251107-075738
DEFAULT BRANCH: master
Ran 16 Mar 2019 02:48AM UTC
Jobs 1
Files 95
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
5038

push

travis-ci

web-flow
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

3364 of 4918 relevant lines covered (68.4%)

211.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5038.1 16 Mar 2019 02:48AM UTC 0
68.4
Travis Job 5038.1
Source Files on build 5038
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5038
  • 02fe8560 on github
  • Prev Build on develop (#5008)
  • Next Build on develop (#5040)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc