bitkompagniet / mugs

(ABANDONED) User management, authentication and authorization API
1 stars 2 forks source link
abandoned express javascript mongodb oss

For API endpoint details, see the documentation.

Quickstart

Add to the project:

npm i --save mugs

Then mount the application:

const express = require('express');
const mugs = require('mugs');

const configuration = {
    appName: 'My application'
};

const app = express();
app.use(mugs(configuration));

Unit tests

npm test

Command line

You can sign a test user token with:

npm run sign -- [--secret <secret>] [--clean] [...roles]

Roles are space-separated roles on the role@scope form. secret is optional, and will default to ssh. The expiry period will be set to 7 days on creation. clean can be set to suppress adding default user roles.

Configuration

User model and endpoints

See the documentation.