@duosecurity/duo_web

中文文档
1.0.6发布于 2021/11/17BSD-3-ClauseCommonJS零依赖近 30 天下载 4348

Duo two-factor authentication for Node.js web applications

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档

Overview

Build Status Issues Forks Stars License

duo_nodejs - Duo two-factor authentication for Node.js web applications: https://duo.com/docs/duoweb-v2

This package allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any web login form - without setting up secondary user accounts, directory synchronization, servers, or hardware.

Files located in the js directory should be hosted by your webserver for inclusion in web pages.

Installing

Development:

$ git clone https://github.com/duosecurity/duo_nodejs.git
$ cd duo_nodejs
$ npm install

System:

$ npm install --global @duosecurity/duo_web

Or run the following to add to your project:

$ npm install --save @duosecurity/duo_web

Using

$ node --interactive
> const duo_web = require('@duosecurity/duo_web');
> duo_web.sign_request(ikey, skey, akey, username);
'TX|...TX_SIGNATURE...==|...TX_HASH...:APP|...APP_SIGNATURE...==|...APP_HASH...'

Test

$ npm run test
...
OK: 13 assertions (42ms)

Lint

$ npm run lint

> @duosecurity/[email protected] lint duo_nodejs
> eslint duo.js index.js tests/

Support

Report any bugs, feature requests, etc. to us directly: [email protected]

版本与发布记录

@duosecurity/duo_web 共发布 3 个版本,首次发布于 2018/07/12;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.6latest2021/11/174 年前
1.0.52020/01/106 年前
1.0.42018/07/128 年前

关于 @duosecurity/duo_web 的常见问题

@duosecurity/duo_web 是什么?

Duo two-factor authentication for Node.js web applications注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @duosecurity/duo_web?

在项目目录运行 npm install @duosecurity/duo_web,或使用 pnpm add / yarn add / bun add。

@duosecurity/duo_web 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/duosecurity__duo_web 是否存在。

@duosecurity/duo_web 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@duosecurity/duo_web 可以商用吗?

@duosecurity/duo_web 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@duosecurity/duo_web 的下载量有多少?

根据 npm 官方下载统计,@duosecurity/duo_web 在 2026/10/13 – 2026/11/11 这 30 天内被下载 4,348 次,日均约 145 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@duosecurity/duo_web 还在维护吗?

最新版本 1.0.6 发布于 2021/11/17(4 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2018/07/12。作者已将其标记为弃用,新项目建议寻找替代方案。