概览
认证 - 说吧 https://www.duosecurity.com/docs/authapi 页面存档备份,存于互联网档案馆
管理员 - 说吧 https://www.duosecurity.com/docs/adminapi (中文(简体) )
账户 - 说吧 https://www.duosecurity.com/docs/accountsapi 页面存档备份,存于互联网档案馆
测试过的节点版本 :
- 第8条
- 10个
- 第12条
- 页:1
- 15个
TLS 1.2 和 1.3 支持
Duo api nodejs使用节点tls库和OpenSSL进行TLS操作. 所有接受安全支持的节点(14及以上)版本都使用支持TLS1.2和1.3的OpenSSL 1.1.
安装
发展:
$ git clone https://github.com/duosecurity/duo_api_nodejs.git
$ cd duo_api_nodejs
$ npm install
系统 :
$ npm install global @duosecurity/duo_api
或运行以下来添加您的项目 :
$ npm install --save @duosecurity/duo_api
使用
$ node --interactive
> const duo_api = require('duo_api');
> const client = new duo_api.Client(ikey, skey, host);
> client.jsonApiCall('POST', '/auth/v2/preauth', { username: 'testuser' }, console.log);
> { response:
{ devices: [ [Object] ],
result: 'auth',
status_msg: 'Account is active' },
stat: 'OK' }
测试
$ npm run test
...
OK: 10 assertions (12ms)
线性
$ npm run lint
> @duosecurity/[email protected] lint duo_api_nodejs
> eslint lib/ tests/
支助
直接向我们报告任何错误、特性请求等: 支持@duosecurity.com