clever-auth
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"clever-auth": { | ||
"driver": "ORM", | ||
"secretKey": "youMustChangeMe", | ||
@@ -14,6 +16,4 @@ | ||
"email_confirmation": false, | ||
"driver": "ORM" | ||
"email_confirmation": false | ||
} | ||
} |
@@ -1,3 +0,10 @@ | ||
module.exports = function ( Model ) { | ||
return Model.extend( 'User', { type: 'ORM', softDeletable: true }, { | ||
module.exports = function ( Model, config ) { | ||
console.log(config['clever-auth'].driver) | ||
return Model.extend( 'User', | ||
{ | ||
type: config['clever-auth'].driver, | ||
softDeletable: true, | ||
timeStampable: true | ||
}, | ||
{ | ||
id: { | ||
@@ -55,5 +62,3 @@ type: Number, | ||
fullName: function() { | ||
return !!this.firstname && !!this.lastname | ||
? [ this.firstname, this.lastname ].join( ' ' ) | ||
: ''; | ||
return !!this.firstname && !!this.lastname ? [ this.firstname, this.lastname ].join( ' ' ) : ''; | ||
} | ||
@@ -60,0 +65,0 @@ } |
{ | ||
"name": "clever-auth", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "passport": "^0.2.0", |
@@ -1,16 +0,47 @@ | ||
# Cleverstack Auth module | ||
CleverStack Authentication Module | ||
==================== | ||
[![NPM version](https://badge.fury.io/js/clever-auth.png)](http://badge.fury.io/js/clever-auth) [![GitHub version](https://badge.fury.io/gh/cleverstack%2Fclever-auth.png)](http://badge.fury.io/gh/cleverstack%2Fclever-auth) [![Dependency Status](https://david-dm.org/CleverStack/clever-auth.png)](https://david-dm.org/CleverStack/clever-auth) [![devDependency Status](https://david-dm.org/CleverStack/clever-auth/dev-status.png)](https://david-dm.org/CleverStack/clever-auth#info=devDependencies) [![Code Climate](https://codeclimate.com/github/CleverStack/clever-auth.png)](https://codeclimate.com/github/CleverStack/clever-auth) [![Build Status](https://secure.travis-ci.org/CleverStack/clever-auth.png?branch=master)](https://travis-ci.org/CleverStack/clever-auth) [![Coverage](https://codeclimate.com/github/CleverStack/clever-auth/coverage.png)](https://codeclimate.com/github/CleverStack/clever-auth) [![NPM downloads](http://img.shields.io/npm/dm/clever-auth.png)](https://www.npmjs.org/package/clever-auth) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) | ||
[![Build Status](http://img.shields.io/travis/CleverStack/clever-auth.svg)](https://travis-ci.org/CleverStack/clever-auth) [![Dependency Status](https://david-dm.org/CleverStack/clever-auth.svg?theme=shields.io)](https://david-dm.org/CleverStack/clever-auth) [![devDependency Status](https://david-dm.org/CleverStack/clever-auth/dev-status.svg?theme=shields.io)](https://david-dm.org/CleverStack/clever-auth#info=devDependencies) [![CleverTech](http://img.shields.io/badge/clever-tech-ff9933.svg)](http://www.clevertech.biz/) | ||
![CleverStack NodeJS Authentication Module](http://cleverstack.github.io/assets/img/logos/node-seed-logo-clean.png "CleverStack NodeJS Authentication Module") | ||
<blockquote> | ||
This CleverStack Module provides users & authentication for the node-seed, it works with either the Object Relational Mapper (clever-orm) AND the Object Document Mapper (clever-odm) Module's. | ||
Provides authentication for your CleverStack app. | ||
Out of the box you can use this module with MongoDB, MySQL, MariaDB, PostgreSQL or SQLite! And because this module uses Redis for session storage it's also scalable. | ||
</blockquote> | ||
## Documentation | ||
See [cleverstack.io](http://cleverstack.io/documentation/#backend) for more detailed information on the Node seed or visit the [Getting Started Guide](http://cleverstack.io/getting-started/) | ||
## Configuration | ||
You can use this module with either the clever-orm (ORM) or clever-odm (ODM) modules, simply add the following config to your /config/local.json (or into your global.json for all environments, or in whatever environment you are using). | ||
``` | ||
// For ODM | ||
"clever-auth": { | ||
"driver": "ODM" | ||
} | ||
// For ORM | ||
"clever-auth": { | ||
"driver": "ORM" | ||
} | ||
``` | ||
## Setup | ||
1. Add 'clever-auth' to the bundledDependencies array of your app's package.json. | ||
2. Run `grunt db` to rebase and seed the data. | ||
3. Install and run Redis Server - http://redis.io/ | ||
Prerequisite: Install and run Redis Server - http://redis.io/ | ||
### Using CLI | ||
1. Run `clever install clever-auth` and follow the prompts | ||
2. Run `clever serve` to start your application. | ||
### Without CLI | ||
1. Clone this repo (or untar it there) into your modules folder (ie modules/clever-auth) | ||
2. Add 'clever-auth' to the bundledDependencies array of your app's package.json. | ||
3. Run `grunt db` to rebase and seed the data. | ||
4. Run `grunt server` to start your application. | ||
## Test Account Credentials | ||
username: `test@clevertech.biz` <br> | ||
password: `password` | ||
username: `test@cleverstack.io` <br> | ||
password: `clever` |
{ | ||
"UserModel": [ | ||
{ | ||
"username": "richard", | ||
"password": "d92dda534ba0200d6ff2bfa2422827b9cea59932", | ||
"email": "richard.gustin86@gmail.com", | ||
"firstname": "Richard", | ||
"lastname": "Gustin", | ||
"phone": "0448048484", | ||
"username": "test", | ||
"password": "a31a61e94f3799a9385dab9966c4c22c9f5790c4", | ||
"email": "test@cleverstack.io", | ||
"firstname": "Clever", | ||
"lastname": "Admin", | ||
"phone": "", | ||
"active": true, | ||
@@ -11,0 +11,0 @@ "confirmed": true, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136584
2870
48