Attributes
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 |
/token/create
Examples 1:
Parameters
{ "attrs": [ "product.id": "pid", "user.id": "userid", "pin": "tokenpin" ] }
Response
{ "error":0, "result": { "id": "tokenid1" } }
Example 2:
Parameters
{ "attrs": [ "product": { "manufacturerCode":"DN", "productCode":"MT" }, "user": { "domain.name":"domain.com", "loginNam":"john.smith" } "pin":tokenpin ] }
Response
{ "error":0, "result": { "id": "tokenid1" } }
/token/get
/token/set
/token/delete
Examples:
Method:/token/delete
Parameters
{ "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
Response
{ "error":0 }
/token/reset
Examples:
Method:/token/reset
Parameters
{ "token": { "serial":"10000000" }, "attrs": //optional { "counter":0 } }
Response
{ "error":0 }
/token/confine
To confine a token, the token cannot be downloaded again.
Examples:
Method:/token/confine
Parameters
{ "token": { "serial":"10000000" } }
Response
{ "error":0 }
/token/release
To release a token, the token can be downloaded again
Examples:
Method:/token/release
Parameters
{ "token": { "serial":"10000000" } }
Response
{ "error":0 }
/token/import
Import hardware tokens into token repository
Examples:
Method: /token/import
Parameters
{ "attrs": { "product.id": "productId", "repository.id": "repoId", "data":"text of import file" } "return":["id","serial"] }
Response
{ "error":0, "result": { "total":3, "rows": [ {"id":"xxx","serial":"1001"}, {"id":"yyy","serial":"1002"}, {"id":"zzz","serial":"1003"} ] } }
/token/syncToken
Examples:
Method:/token/syncToken
Parameters
{ "user": { "id": "userid" }, "token": { "serial":"10000000" }, "credential":"otp1,otp2" }
Response
{ "error":0 }
/token/batchAssignTokens
Examples:
Method:/token/batchAssignTokens
Parameters
{ "attrs": { "csv": "content of csv file", "charset":"UTF-8" } }
Response
{ "error":0 }
Format of the CSV file:
example.csv
domain,loginName,manufacturerCode,productCode,serial,status,pin "test domain", "john.smith", "DN", "MT", "10000", "ACTIVE", "1234"