moon-contrib-user-local

local authentication strategy for moon-contrib-user

npm install moon-contrib-user-local
8 downloads in the last week
8 downloads in the last month

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.
npm loves you