Anchor |
---|
| _Toc341972467 |
---|
| _Toc341972467 |
---|
|
Attributes
Attribute | type | values | default | mandate | comment |
---|
serial | string |
|
| true |
|
Identifier | String |
|
| true |
|
Status | String | ACTIVE, DISABLED, DECEASED |
|
|
|
description | string |
|
| false |
|
users | coll |
|
|
|
|
assignedUsers | coll |
|
|
|
|
sharedUsers | coll |
|
|
|
|
product | object |
|
| true |
|
repository | object |
|
| false |
|
Anchor |
---|
| _Toc341972468 |
---|
| _Toc341972468 |
---|
|
/token/create
Examples 1:
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"attrs":
[
"product.id": "pid",
"user.id": "userid",
"pin": "tokenpin"
]
} |
Code Block |
---|
|
{
"error":0,
"result":
{
"id": "tokenid1"
}
} |
Example 2:
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"attrs":
[
"product":
{
"manufacturerCode":"DN",
"productCode":"MT"
},
"user":
{
"domain.name":"domain.com",
"loginNam":"john.smith"
}
"pin": "tokenpin"
]
} |
Code Block |
---|
|
{
"error":0,
"result":
{
"id": "tokenid1"
}
} |
Anchor |
---|
| _Toc341972469 |
---|
| _Toc341972469 |
---|
|
/token/get
Examples:
Method: /token/get
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"match":
[
"serial":"token serial"
],
"return":["id", "serial","status"]
} |
Code Block |
---|
|
{
"error":0,
"result":
{
"id": "token id1",
"serial": "serial1",
"status": "ACTIVE"
}
} |
Anchor |
---|
| _Toc341972470 |
---|
| _Toc341972470 |
---|
|
/token/set
Examples:
Method:/token/set
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"id": "token id1",
"attrs":
{
"status": "DISABLED"
}
} |
Anchor |
---|
| _Toc341972471 |
---|
| _Toc341972471 |
---|
|
/token/delete
Examples:
Method:/token/delete
Code Block |
---|
language | js |
---|
title | 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
Anchor |
---|
| _Toc341972472 |
---|
| _Toc341972472 |
---|
|
/token/reset
Examples:
Method:/token/reset
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"token":
{
"serial":"10000000"
},
"attrs": //optional
{
"counter":0
}
} |
Anchor |
---|
| _Toc341972473 |
---|
| _Toc341972473 |
---|
|
/token/confine
To confine a token, the token cannot be downloaded again.
Examples:
Method:/token/confine
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"token":
{
"serial":"10000000"
}
} |
Anchor |
---|
| _Toc341972474 |
---|
| _Toc341972474 |
---|
|
/token/release
To release a token, the token can be downloaded again
Examples:
Method:/token/release
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"token":
{
"serial":"10000000"
}
} |
Anchor |
---|
| _Toc341972475 |
---|
| _Toc341972475 |
---|
|
/token/import
Import hardware tokens into token repository
Examples:
Method: /token/import
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"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 |
---|
| _Toc341972478 |
---|
| _Toc341972478 |
---|
|
/token/syncToken
Examples:
Method:/token/syncToken
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"user":
{
"id": "userid"
},
"token":
{
"serial":"10000000"
},
"credential":"otp1,otp2"
} |
Anchor |
---|
| _Toc341972480 |
---|
| _Toc341972480 |
---|
|
/token/batchAssignTokens
Examples:
Method:/token/batchAssignTokens
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"attrs":
{
"csv": "content of csv file",
"charset":"UTF-8"
}
} |
Format of the CSV file:
Code Block |
---|
|
domain,loginName,manufacturerCode,productCode,serial,status,pin
"test domain", "john.smith", "DN", "MT", "10000", "ACTIVE", "1234" |
Anchor |
---|
| token_download_offline_data |
---|
| token_download_offline_data |
---|
|
/token/downloadOfflineData
Examples:
Method:/token/downloadOfflineData
Code Block |
---|
language | js |
---|
title | Parameters |
---|
|
{
"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"
]
}
} |
Code Block |
---|
|
{
"error": 0,
"message": "Succeeded",
"result": {
"offlineData": "encrypted data encoded in base64"
}
} |
Anchor |
---|
token_preregister | token_preregister | /token/preRegister Include Page |
---|
token/preRegister | token/preRegister | Anchor |
---|
token_register | token_register | /token/register Include Page |
---|
token/register | token/register |