Skip to content

Commit 2bcf70d

Browse files
committed
added totp functions documentation
Signed-off-by: Rod Anami <[email protected]>
1 parent a485d51 commit 2bcf70d

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ ha/*.env
7070

7171
# webstorm files
7272
.idea/
73+
74+
# Mac files
75+
.DS_Store
76+
*/.DS_Store
77+
*/.AppleDouble

docs/TOTP-Functions.md

+35
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,39 @@
22

33
## TOTP Functions List
44

5+
* createTOTPKey(token, name, params, mount)
6+
7+
```javascript
8+
/**
9+
* @param {string} token
10+
* @param {string} name
11+
* @param {Object} params
12+
* @param {boolean} params.generate
13+
* @param {boolean} [params.exported] - whether the key is exportable as QR code
14+
* @param {number} [params.key_size=20]
15+
* @param {string} [params.key_url]
16+
* @param {string} [params.key]
17+
* @param {string} [params.issuer] - key issuing entity
18+
* @param {string} [params.account_name]
19+
* @param {number} [params.period=30] - length of time for the counter on the code calculation
20+
* @param {string} [params.algorithm=sha1] - code generator algorithm, either "SHA1", "SHA256", or "SHA512"
21+
* @param {number} [params.digits] - number of code digits, either 6 or 8
22+
* @param {number} [params.skew=1] - number of delay periods valid for code validation, either 0 or 1
23+
* @param {number} [params.gr_size=200] - pixel size of the QR code image
24+
* @param {string} [mount]
25+
* @returns {PromiseLike<Object>}
26+
*/
27+
```
28+
29+
* readTOTPKey(token, name, mount)
30+
31+
```javascript
32+
/**
33+
* @param {string} token
34+
* @param {string} name
35+
* @param {string} [mount]
36+
* @returns {PromiseLike<Object>}
37+
*/
38+
```
39+
540
## End

docs/Token-Functions.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,16 @@
2525
* @returns {Promise<Object>}
2626
*/
2727
```
28+
2829
**Note:** vaultToken is a Vault token that has _create_ capability on the `auth/token/create` path.
2930

30-
* createSToken - *WITHDRAW*
31+
* createSToken - _WITHDRAW_
3132

32-
* createBToken - *WITHDRAW*
33+
* createBToken - _WITHDRAW_
3334

34-
* createOrphanSToken - *WITHDRAW*
35+
* createOrphanSToken - _WITHDRAW_
3536

36-
* createOrphanBToken - *WITHDRAW*
37+
* createOrphanBToken - _WITHDRAW_
3738

3839
* revokeToken(vaultToken, clientToken)
3940

@@ -133,3 +134,5 @@
133134
* @returns {Promise<Object>}
134135
*/
135136
```
137+
138+
## End

0 commit comments

Comments
 (0)