Skip to content

Commit 4c4b88e

Browse files
authored
DX-2778 Ubuntu Version (#36)
* DX-2778 Ubuntu Version * readme
1 parent 6bce08b commit 4c4b88e

File tree

2 files changed

+87
-87
lines changed

2 files changed

+87
-87
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
os: [windows-2022, windows-2019, ubuntu-18.04, ubuntu-20.04]
19+
os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04]
2020
node-version: ['12', '14', '16']
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
2424

2525
- name: Setup Node
26-
uses: actions/setup-node@v2
26+
uses: actions/setup-node@v3
2727

2828
- name: NPM Install
2929
run: npm install

README.md

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
1-
# Bandwidth Node Multi-Factor Authentication SDK
2-
3-
Note: As of version 3.0.0, this package has been upgraded to TypeScript
4-
5-
[![Test](https://github.com/Bandwidth/node-mfa/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/node-mfa/actions/workflows/test.yml)
6-
7-
| **OS** | **Node** |
8-
|:---:|:---:|
9-
| Windows 2016 | 12, 14, 16 |
10-
| Windows 2019 | 12, 14, 16 |
11-
| Ubuntu 18.04 | 12, 14, 16 |
12-
| Ubuntu 20.04 | 12, 14, 16 |
13-
14-
## Getting Started
15-
16-
### Installation
17-
18-
```
19-
npm install @bandwidth/mfa
20-
```
21-
22-
### Initialize
23-
24-
```
25-
import { Client, MFAController } from '@bandwidth/mfa';
26-
27-
const client = new Client({
28-
basicAuthUserName: "username",
29-
basicAuthPassword: "password"
30-
});
31-
32-
const controller = new MFAController(client);
33-
const accountId = "12345";
34-
```
35-
36-
### Create A MFA Request
37-
38-
```
39-
var from = "+15554443333";
40-
var to = "+15553334444";
41-
var applicationId = "3-a-b-c";
42-
var scope = "scope";
43-
var digits = 6;
44-
var message = "Your temporary {NAME} {SCOPE} code is {CODE}";
45-
46-
var requestBody = {
47-
from: from,
48-
to: to,
49-
applicationId: applicationId,
50-
scope: scope,
51-
digits: digits,
52-
message: message
53-
};
54-
55-
await controller.voiceTwoFactor(accountId, requestBody);
56-
57-
//request verification
58-
const code = '123456'; //this is the user input to validate
59-
const expirationTimeInMinutes = 3
60-
61-
var verifyBody = {
62-
to: to,
63-
applicationId: applicationId,
64-
scope: scope,
65-
code: code,
66-
expirationTimeInMinutes: expirationTimeInMinutes
67-
}
68-
69-
var verifyMfaResponse = await controller.verifyTwoFactor(accountId, verifyBody);
70-
71-
console.log(verifyMfaResponse.result.valid);
72-
```
73-
74-
## Supported Node Versions
75-
76-
This package can be used with Node >= 10
77-
78-
## Documentation
79-
80-
Documentation for this package can be found at https://dev.bandwidth.com/sdks/node.html
81-
82-
## Credentials
83-
84-
Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html
1+
# Bandwidth Node Multi-Factor Authentication SDK
2+
3+
Note: As of version 3.0.0, this package has been upgraded to TypeScript
4+
5+
[![Test](https://github.com/Bandwidth/node-mfa/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/node-mfa/actions/workflows/test.yml)
6+
7+
| **OS** | **Node** |
8+
|:---:|:---:|
9+
| Windows 2016 | 12, 14, 16 |
10+
| Windows 2019 | 12, 14, 16 |
11+
| Ubuntu 20.04 | 12, 14, 16 |
12+
| Ubuntu 22.04 | 12, 14, 16 |
13+
14+
## Getting Started
15+
16+
### Installation
17+
18+
```
19+
npm install @bandwidth/mfa
20+
```
21+
22+
### Initialize
23+
24+
```
25+
import { Client, MFAController } from '@bandwidth/mfa';
26+
27+
const client = new Client({
28+
basicAuthUserName: "username",
29+
basicAuthPassword: "password"
30+
});
31+
32+
const controller = new MFAController(client);
33+
const accountId = "12345";
34+
```
35+
36+
### Create A MFA Request
37+
38+
```
39+
var from = "+15554443333";
40+
var to = "+15553334444";
41+
var applicationId = "3-a-b-c";
42+
var scope = "scope";
43+
var digits = 6;
44+
var message = "Your temporary {NAME} {SCOPE} code is {CODE}";
45+
46+
var requestBody = {
47+
from: from,
48+
to: to,
49+
applicationId: applicationId,
50+
scope: scope,
51+
digits: digits,
52+
message: message
53+
};
54+
55+
await controller.voiceTwoFactor(accountId, requestBody);
56+
57+
//request verification
58+
const code = '123456'; //this is the user input to validate
59+
const expirationTimeInMinutes = 3
60+
61+
var verifyBody = {
62+
to: to,
63+
applicationId: applicationId,
64+
scope: scope,
65+
code: code,
66+
expirationTimeInMinutes: expirationTimeInMinutes
67+
}
68+
69+
var verifyMfaResponse = await controller.verifyTwoFactor(accountId, verifyBody);
70+
71+
console.log(verifyMfaResponse.result.valid);
72+
```
73+
74+
## Supported Node Versions
75+
76+
This package can be used with Node >= 10
77+
78+
## Documentation
79+
80+
Documentation for this package can be found at https://dev.bandwidth.com/sdks/node.html
81+
82+
## Credentials
83+
84+
Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html

0 commit comments

Comments
 (0)