Skip to content

Commit

Permalink
Merge branch 'release-1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Aug 26, 2016
2 parents 1d8b477 + 1f85ac1 commit e5b698b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 25 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.0.1"></a>
## 1.0.1 (2016-08-26)


* Update adonis-fold


<a name="1.0.0"></a>
# 1.0.0 (2016-06-26)

Expand Down
8 changes: 4 additions & 4 deletions commands/Setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class AuthSetup extends Command {
}

* handle () {
this.run('make:migration', 'User', {template: path.join(__dirname, './templates/userSchema.mustache')})
this.run('make:migration', 'Token', {template: path.join(__dirname, './templates/tokenSchema.mustache')})
this.run('make:model', 'User', {template: path.join(__dirname, './templates/userModel.mustache')})
this.run('make:model', 'Token', {template: path.join(__dirname, './templates/tokenModel.mustache')})
this.run('make:migration', 'create_users_table', { template: path.join(__dirname, './templates/userSchema.mustache') })
this.run('make:migration', 'create_tokens_table', { template: path.join(__dirname, './templates/tokenSchema.mustache') })
this.run('make:model', 'User', { template: path.join(__dirname, './templates/userModel.mustache') })
this.run('make:model', 'Token', { template: path.join(__dirname, './templates/tokenModel.mustache') })
}

}
Expand Down
4 changes: 2 additions & 2 deletions commands/templates/tokenSchema.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

const Schema = use('Schema')

class TokenSchema extends Schema {
class TokensTableSchema extends Schema {
up () {
this.create('tokens', (table) => {
this.create('tokens', table => {
table.increments()
table.integer('user_id').unsigned().references('id').inTable('users')
table.string('token', 40).notNullable().unique()
Expand Down
6 changes: 2 additions & 4 deletions commands/templates/userSchema.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

const Schema = use('Schema')

class UserSchema extends Schema {
class UsersTableSchema extends Schema {
up () {
this.create('users', (table) => {
this.create('users', table => {
table.increments()
table.string('username', 80).notNullable().unique()
table.string('email', 254).notNullable().unique()
table.string('password', 60).notNullable()
table.string('firstname')
table.string('lastname')
table.timestamps()
})
}
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adonis-auth",
"version": "1.0.0",
"version": "1.0.1",
"description": "Offical authentication provider for Adonis framework",
"main": "index.js",
"directories": {
Expand All @@ -20,17 +20,17 @@
"author": "adonisjs",
"license": "MIT",
"devDependencies": {
"adonis-fold": "^3.0.2",
"adonis-fold": "^3.0.3",
"chai": "^3.5.0",
"co": "^4.6.0",
"co-mocha": "^1.1.2",
"co-mocha": "^1.1.3",
"coveralls": "^2.11.8",
"cz-conventional-changelog": "^1.1.5",
"istanbul": "^0.4.2",
"mocha": "^2.4.5",
"mocha": "^3.0.2",
"sinon-es6": "0.0.3",
"standard": "^7.1.0",
"supertest": "^1.2.0"
"standard": "^8.0.0",
"supertest": "^2.0.0"
},
"config": {
"commitizen": {
Expand All @@ -41,13 +41,13 @@
"adonis-fold": "^3.0.2"
},
"dependencies": {
"basic-auth": "^1.0.3",
"cat-log": "^1.0.0",
"basic-auth": "^1.0.4",
"cat-log": "^1.0.2",
"co-functional": "^0.2.1",
"harmony-reflect": "^1.4.2",
"harmony-reflect": "^1.5.0",
"jsonwebtoken": "^5.7.0",
"ms": "^0.7.1",
"node-exceptions": "^1.0.1",
"node-exceptions": "^1.0.3",
"node-uuid": "^1.4.7"
}
}
8 changes: 4 additions & 4 deletions src/Schemes/BaseScheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ class BaseScheme {
* sequence.
* 1. return true - If user exists on the instance
* 2. Check for session value
* a) return false - If session does not exists
* b) Go to step 3
* a) return false - If session does not exists
* b) Go to step 3
* 3. find the user using the serializer and passing id
* a) return false - If user does not exist
* b) Go to step 4
* a) return false - If user does not exist
* b) Go to step 4
* 4. set user object on instance and return true
*
* @return {Boolean}
Expand Down
2 changes: 1 addition & 1 deletion src/Schemes/Session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SessionScheme extends BaseScheme {
* @return {Boolean}
*
* @throws InvalidArgumentException when primary key value does not exists
* on the input
* on the input
*
* @public
*/
Expand Down

0 comments on commit e5b698b

Please sign in to comment.