vantage-auth-basic is an authentication extension designed for the vantage.js interactive CLI framework. It provides basic authentication capabilities, prompting users for usernames and passwords configured on the Vantage server. Key features include configurable retry limits for incorrect password attempts, a delay between retries, and an account lockout mechanism with a specified unlock timeout. As of version 1.0.0, this extension is tightly integrated with vantage.js and is often used by simply specifying the string "basic" in the vantage.auth() method, negating the need for a separate `require()` call when used within a Vantage application. Given the vantage.js framework's last significant activity being several years ago, this package is effectively abandoned and not recommended for new projects.
npm install vantage-auth-basicVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure basic authentication with `vantage-auth-basic` for a Vantage.js instance, defining users, retry policies, and an example command that accesses the authenticated user's information.
Migrate to a currently maintained CLI framework and authentication solution, such as Commander.js or Oclif with appropriate authentication middleware.
If absolutely necessary to use, ensure your project uses CommonJS modules. For new development, consider alternative, actively maintained CLI frameworks.
Use `vantage.auth("basic", options);` instead of explicitly requiring the module if integrating directly into a Vantage instance.For production, pre-hash passwords before storing them in the `users` array and implement custom verification logic within Vantage, or use a separate authentication system.
Check the username and password for correctness. If locked out, wait for the 'unlockTime' duration to expire, or restart the Vantage session if the lockout is session-bound. Review the 'retry' and 'unlockTime' options in your configuration for appropriate values.