ku4node-authentication

kodmunki authentication

ku4node-authentication

kodmunki™ utilities for Node.js authentication management

  • Notes:
  • new authenticationService(new authenticationRepository([YOUR DATABASE], [YOUR ACCOUNTREPOSITORY]);
  • YOUR ACCOUNTREPOSITORY must implement findByUsernameAndPassword(username, password, callback
  • authenticationService.login(username, password, callback) will callback with a token: {"ticket": ticket, "account": YOUR ACCOUNT }
  • authenticationService.validate(ticket, callback) will callback with a bool expressing isValid
  • authenticationService.renew(ticket, callback) will callback with the token: {"ticket": ticket}