@nodevisor/auth
v0.0.83
Published
Module provides ability to authenticate users
Downloads
122
Readme
@nodevisor/auth
Set and manage user passwords on remote systems.
Part of Nodevisor — TypeScript Infrastructure Automation Platform
Install
npm install @nodevisor/authQuick Start
import $ from '@nodevisor/shell';
import Auth from '@nodevisor/auth';
const $server = $.connect({ host: '10.0.0.10', username: 'root' });
const auth = $server(Auth);
// Set a user's password
await auth.setPassword('runner', 'super-secret-password');Create a User with Password
import $, { Users, Auth } from 'nodevisor';
const $server = $.connect({ host: '10.0.0.10', username: 'root' });
await $server(Users).add('runner');
await $server(Auth).setPassword('runner', process.env.RUNNER_PASSWORD!);API
| Method | Description |
|--------|-------------|
| setPassword(username, password) | Set or update a user's password (uses chpasswd on Linux) |
| logout() | Logout the current user session |
Related Packages
@nodevisor/users— Create and manage users@nodevisor/authorized-keys— SSH key-based authentication@nodevisor/ssh— SSH server configuration
Documentation
Full documentation available at nodevisor.com/docs/packages/auth
License
Nodevisor uses a single O'Saasy license across all packages and applications. See the full terms in LICENSE.
