...
Attribute | type | values | default | mandate | comment | ||||
serial | string |
|
| true | |||||
Identifier | String |
|
| true | |||||
Status | String | ACTIVE, |
|
|
| ||||
description | string |
|
| false | |||||
users | coll |
|
|
|
| ||||
assignedUsers | coll |
|
|
|
| ||||
sharedUsers | coll |
|
|
|
| ||||
product | object |
|
| true | |||||
repository | object |
|
| false |
|
| Anchor | ||||
|---|---|---|---|---|
|
+Examples 1:+
Method:/token/create
Parameters:
\{
1:Wiki Markup
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "attrs": |
...
[ |
...
"product.id": "pid", |
...
"user.id": "userid", "pin": "tokenpin" |
...
] |
...
} |
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "error":0, "result": |
...
{ "id": |
...
"tokenid1" } |
...
} |
Example 2:
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "attrs": |
...
[ |
...
"product": |
...
{ |
...
"manufacturerCode":"DN", |
...
"productCode":"MT" |
...
}, |
...
"user": |
...
{ |
...
"domain.name":"domain.com", |
...
"loginNam":"john.smith" |
...
} "pin":tokenpin |
...
] |
...
} |
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "error":0, "result": |
...
{ "id": |
...
"tokenid1" } |
...
} |
...
| Anchor | ||||
|---|---|---|---|---|
|
...
Examples:
Method:/token/delete
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"id":"token id" |
...
"user": |
...
{ "id": |
...
"tokenid1", "domain.id": "domainId", |
...
"loginName": |
...
"loginName" } } |
// Note: if the user block is given, system will unassign the token from the user instead of delete the token itself }
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"error":0 |
...
} |
| Anchor | ||||
|---|---|---|---|---|
|
Examples:
Method:/token/reset Parameters:
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ |
...
"token": |
...
{ "serial":"10000000" |
...
}, |
...
"attrs": //optional |
...
{ "counter":0 |
...
}
} |
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"error":0 |
...
} |
| Anchor | ||||
|---|---|---|---|---|
|
To confine a token, the token cannot be downloaded again.
Examples:
Method:/token/confine
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"token": |
...
{ "serial":"10000000" |
...
}
} |
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"error":0 |
...
} |
| Anchor | ||||
|---|---|---|---|---|
|
To release a token, the token can be downloaded again
Examples:
Method:/token/release
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"token": |
...
{ "serial":"10000000" |
...
}
} |
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"error":0 |
...
} |
| Anchor | ||||
|---|---|---|---|---|
|
Import hardware tokens into token repository
Examples: +Examples:+
Method: /token/create
Parameters:
\{
importWiki Markup
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "attrs": |
...
{ |
...
"product.id": |
...
"productId", |
...
"repository.id": |
...
"repoId", |
...
"data":"text of import file" |
...
} "return": |
...
["id","serial" |
...
]
|
...
} |
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "error":0, "result": |
...
{ |
...
"total":3, |
...
"rows": |
...
[ |
...
{"id":"xxx","serial":"1001" |
...
},
|
...
{"id":"yyy","serial":"1002" |
...
},
|
...
{"id":"zzz","serial":"1003" |
...
}
|
...
] |
...
} |
...
} |
...
| Anchor | ||
|---|---|---|
|
...
|
...
|
...
syncToken
Examples:
Method:/token/getDownloadUrlsyncToken Parameters:
| Code Block |
|---|
...
|
...
| |||
{
"user":
{
"id": "userid"
},
"token":
{
|
...
"serial":"10000000" |
...
}, |
...
"credential":"otp1,otp2" |
...
} |
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
"error":0 |
...
} |
| Anchor | ||
|---|---|---|
|
...
|
...
|
...
batchAssignTokens
Examples:
Method:/token/retrieveCredentialbatchAssignTokens
| Code Block | ||||
|---|---|---|---|---|
|
...
{ |
...
" |
...
attrs": |
...
{ "csv": |
...
"content of csv file", "charset":" |
...
UTF-8"
}
} |
| Code Block | ||||
|---|---|---|---|---|
| ||||
{ "error":0 |
...
} |
Format of the CSV file:
| Code Block | ||
|---|---|---|
| ||
domain,loginName,manufacturerCode,productCode,serial,status,pin
"test domain", "john.smith", "DN", "MT", "10000", "ACTIVE", "1234" |