entryway

0.0.15 • Public • Published

Entryway

This project provides a node module that allows you to manage user authentication data to a variety of backend repositories via a provider/plugin design. Currently there is support for persisting data to both DocumentDB and DynamoDB.

##Installation ###Core Module

This module can be installed as follows:

npm install entryway-documentdb

In addition you will need to install an existing Entryway provider module or create your own.

##Usage

Once your provider has been configured correctly you can start utilizing Entryway as follows:

var id = '';
var UserSchema = require('entryway').UserSchema;
var provider = require('entryway-documentdb');
var user = new UserSchema(provider);
user.userHandle = 'testuser';
user.fullName = 'Test User';
user.location = 'Denver, CO';
user.avatar = 'http://www.myavatarurl.com';
user.bio = 'A test user from a long line of test users...';
user.addLocalStrategy('testuser', 'PASSWORD1!', function(err, results){
	if (err) throw err;
	user.save(function(errSave, saveResults){
		if (errSave) throw errSave;
		id = user.id;		//unique id generated by provider
	});
});

Entryway also supports the concept of multiple tenants. In order to utilize this feature all you need to do is set the 'tenant' property off of the UserSchema.

Readme

Keywords

none

Package Sidebar

Install

npm i entryway

Weekly Downloads

5

Version

0.0.15

License

Apache-2.0

Last publish

Collaborators

  • cdellinger