UNPKG

@hicoder/express-auth-server

Version:

Model Driver Development Stack - authentication and authorization server for mongoose and express based application. It can be enabled to work as authentication, user profile managment, and authorization management servers.

9 lines (6 loc) 340 B
// The default authz definition for role based access on "muser" model const authUserDef = require('../authn/model.user'); const GetAuthzModuleDef = require('./model.user-role'); let accScmName = authUserDef.authn.authUserSchema; const authzDef = GetAuthzModuleDef(accScmName, authUserDef.schemas[accScmName]); module.exports = authzDef;