emqx/apps/emqx_auth_username
Zaiming Shi 5bb0cccb53 refactor(build): Clean up app version management
Starting from 5.0.0, all apps in apps dir should follow semver
strictly. Do not use the umbrella project's release tags.

The universal tags made sense when we have applications scattered
in different repos. Now since this is an umbrella project, it is
enough to have a single package level version number corelated with
git tag.
2020-12-01 23:22:33 +01:00
..
include Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00
priv Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00
src refactor(build): Clean up app version management 2020-12-01 23:22:33 +01:00
test Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00
README.md Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00
rebar.config Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00
TODO Migrate plugins from tag 4.2.2 2020-10-31 12:10:19 +08:00

emqx_auth_username

EMQ X 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

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

EMQ X Team.