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



/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

Examples:
Method: /token/get

Parameters
{
	"match":
	[
		"serial":"token serial"
	],
	"return":["id", "serial","status"]
}
Response
{
	"error":0,
	"result":
	{
		"id": "token id1",
		"serial": "serial1",
		"status": "ACTIVE"
	}
}

/token/set

Examples:
Method:/token/set

Parameters
{
	"id": "token id1",
	"attrs":
	{
		"status": "DISABLED"
	}
}
Response
{
	"error":0
}

/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"

/token/downloadOfflineData

Examples:
Method:/token/downloadOfflineData

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"
        ]
    }
}
Response
{
    "error": 0,
    "message": "Succeeded",
    "result": {
        "offlineData": "encrypted data encoded in base64"
    }
}