https://github.com/emqx/emqx-auth-username
EMQX Authentication with Username and Password
https://github.com/emqx/emqx-auth-username
authentication emqx emqx-plugin username-authentication
Last synced: 8 months ago
JSON representation
EMQX Authentication with Username and Password
- Host: GitHub
- URL: https://github.com/emqx/emqx-auth-username
- Owner: emqx
- License: apache-2.0
- Created: 2016-10-15T06:18:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-27T07:39:38.000Z (over 2 years ago)
- Last Synced: 2025-09-29T22:58:33.380Z (9 months ago)
- Topics: authentication, emqx, emqx-plugin, username-authentication
- Language: Erlang
- Homepage: https://emqx.io
- Size: 214 KB
- Stars: 18
- Watchers: 16
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
emqx_auth_username
==================
EMQX Authentication with Username and Password
Build
-----
```
make && make tests
```
Configuration
-------------
etc/emqx_auth_username.conf:
```
## Password hash.
##
## Value: plain | md5 | sha | sha256
auth.user.password_hash = sha256
```
[REST API](https://developer.emqx.io/docs/emq/v3/en/rest.html)
------------
List all usernames
```
# Request
GET api/v4/auth_username
# Response
{
"code": 0,
"data": ["username1"]
}
```
Add a username:
```
# Request
POST api/v4/auth_username
{
"username": "some_name",
"password": "password"
}
# Response
{
"code": 0
}
```
Update password for a username:
```
# Request
PUT api/v4/auth_username/$NAME
{
"password": "password"
}
# Response
{
"code", 0
}
```
Lookup a username info:
```
# Request
GET api/v4/auth_username/$NAME
# Response
{
"code": 0,
"data": {
"username": "some_username",
"password": "hashed_password"
}
}
```
Delete a username:
```
# Request
DELETE api/v4/auth_username/$NAME
# Response
{
"code": 0
}
```
Load the Plugin
---------------
```
./bin/emqx_ctl plugins load emqx_auth_username
```
License
-------
Apache License Version 2.0
Author
------
EMQX Team.