local authentication strategy for moon-contrib-user
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
commands
static/js
.gitignore
.npmignore
README.md
api.js
index.js
model.js
package.json
settings.js

README.md

Moonshine user local component

Moon-contrib-user-local is an username/password authentication provider for moon-contrib-user.

###Moon-contrib-user-local

  • Applicable settings:

  • USER_LOCAL_ALGORITHM: hashing algorithm to be used to hash passwords. --defaults to 'sha512'

  • USER_LOCAL_SALTLENGTH: length of random salt to be used for to hash passwords --defaults to 16

  • USER_LOCAL_ITERATIONS: number of times to hash the password. --defaults to 2

  • USER_LOCAL_SECRET_TOKEN: secret token to attach to password to increase password length (if secret token is not jepordized).

  • USER_LOCAL_MINIMUM_PASSWORD_LENGTH: minimum length of password for password validation. --defaults to 8

  • Commands:

  • createuser: creates a new user with the given username and password. (use with `moonshine createuser --username=? --password=?)

  • New Resources:

  • "/users/login/local/": log in with username password (post with simple json).

  • Model extensions:

  • User: the user model has been enriched with the following methods. *findByUsernameAndPassword(username,password,callback): static Model method. Finds a user by given username and password (not encrypted). *__

  • Angular modules:

  • user.local['/js/user.local.js'] : new authenticator named "local" is provided. Automatically registered once user.local module is dependend on.