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:
{
"attrs":
[
"product.id": "pid",
"user.id": "userid",
"pin": "tokenpin"
]
}
{
"error":0,
"result":
{
"id": "tokenid1"
}
}
Example 2:
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
]
}
{
"error":0,
"result":
{
"id": "tokenid1"
}
}
/token/get
Examples:
Method: /token/get
{
"match":
[
"serial":"token serial"
],
"return":["id", "serial","status"]
}
{
"error":0,
"result":
{
"id": "token id1",
"serial": "serial1",
"status": "ACTIVE"
}
}
/token/set
Examples:
Method:/token/set
{
"id": "token id1",
"attrs":
{
"status": "DISABLED"
}
}
{
"error":0
}
/token/delete
Examples:
Method:/token/delete
{
"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
{
"error":0
}
/token/reset
Examples:
Method:/token/reset
{
"token":
{
"serial":"10000000"
},
"attrs": //optional
{
"counter":0
}
}
{
"error":0
}
/token/confine
To confine a token, the token cannot be downloaded again.
Examples:
Method:/token/confine
{
"token":
{
"serial":"10000000"
}
}
{
"error":0
}
/token/release
To release a token, the token can be downloaded again
Examples:
Method:/token/release
{
"token":
{
"serial":"10000000"
}
}
{
"error":0
}
/token/import
Import hardware tokens into token repository
Examples:
Method: /token/import
{
"attrs":
{
"product.id": "productId",
"repository.id": "repoId",
"data":"text of import file"
}
"return":["id","serial"]
}
{
"error":0,
"result":
{
"total":3,
"rows":
[
{"id":"xxx","serial":"1001"},
{"id":"yyy","serial":"1002"},
{"id":"zzz","serial":"1003"}
]
}
}
/token/syncToken
Examples:
Method:/token/syncToken
{
"user":
{
"id": "userid"
},
"token":
{
"serial":"10000000"
},
"credential":"otp1,otp2"
}
{
"error":0
}
/token/batchAssignTokens
Examples:
Method:/token/batchAssignTokens
{
"attrs":
{
"csv": "content of csv file",
"charset":"UTF-8"
}
}
{
"error":0
}
Format of the CSV file:
domain,loginName,manufacturerCode,productCode,serial,status,pin "test domain", "john.smith", "DN", "MT", "10000", "ACTIVE", "1234"
/token/downloadOfflineData
Examples:
Method:/token/downloadOfflineData
{
"application": {
"name": "test-desktop-logon" // has to be the application name in current implementation
},
"encryptionKey":"encryption key", // optional
"tokens": [
{
"id": "df2aac1138fe109b7a7f30c70ede1217" // or other token attributes, serial etc
},
{
"id": "ccd27d2f4dc6ca67430f042578847105"
},
{
"id": "1ee19c081fb26e9461f51e330069a978"
}
],
"user": {
"id": "userid" // or other user attributes, like: "loginName": "acme\\john.smith" etc
},
"return": {
"tokenAssignment": [
"*"
],
"user": [
"loginName",
"email",
"userPrincipalName",
"domain.name",
"domain.netbiosName",
"domain.dnsName"
]
}
}
{
"error": 0,
"message": "Succeeded",
"result": {
"offlineData": "encrypted data encoded in base64"
}
}