authelia/example/compose/duo-api/duo_client.js

10 lines
344 B
JavaScript
Raw Normal View History

/*
* This is just client script to test the fake API.
*/
const DuoApi = require("@duosecurity/duo_api");
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
const client = new DuoApi.Client("ABCDEFG", "SECRET", "duo.example.com");
client.jsonApiCall("POST", "/auth/v2/auth", { username: 'john', factor: "push", device: "auto" }, console.log);