Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Anchor
_Toc341972345
_Toc341972345
/auth/listApplications

Parameters:

Code Block
languagejs
{
	"return":["id","name"]
}

Response:resetLogon

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":2,
		"rows":
		[
			{
				"id":"aid1",
				"name":"application 1"
			},
			{
				"id":"aid2",
				"name":"application 2"
			}
		]
	}
}

Anchor
_Toc341972346
_Toc341972346
/auth/listDomains

Parameters:

Code Block
languagejs
{
	"application":
	{
		"id":"appid"
	},
	"return":["id","name"]
}

...

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":2,
		"rows":
		[
			{
				"id":"domain id 1",
				"name":"domain 1"
			},
			{
				"id":"domain id 2",
				"name":"domain 2"
			}
		]
	}
}

Anchor
_Toc341972347
_Toc341972347
/auth/listAuthenticators

List authenticators in the specified logon step.

Parameters:

Code Block
languagejs
{
	"step": 1// step is 1-based
	"application":
	{
		"id":"appid"
	},
	"user":
	{
		"domain.id":"domainid",
		"loginName":"login name"
	}
}

...

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":2,
		"rows":
		[
			{"code":"OTP", "name":"One-Time Password"},
			{"code":"OTPoD", "name":"On-Demand Password"}
		]
	}
}

Anchor
_Toc341972348
_Toc341972348
/auth/getLogonSteps

Parameters:

Code Block
languagejs
{
	"application":
	{
		"id": "appid"
	},
	"user":
	{
		"loginName": "user login name"
	},
	"return":["name","challengResponse","authenticators"]
}

...

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":2,
		"rows":
		[
			{
				"name": "step 1",
				"challengResponse": false,
				"authenticators":
				[
					{"code":"OTP", "name":"One-Time Password"}
				]
			},
			{
				"name": "step 2",
				"challengResponse": false,
				"authenticators":
				[
					{"code":"SPASS", "name":"Static Password"}
				]
			}
		]
	}
}

Anchor
auth_

...

listTokenAssignments
auth_

...

listTokenAssignments
/auth/

...

listTokenAssignments

Examples:

The following example will list all OOBA tokens:


Method: Method: /auth/logonlistTokenAssignments
Parameters:

Code Block
languagejs
{
	"application":
	{
		"id":"appid"
	},
	"user":
	{
		"id":"userid"
	},
	"token":
	{
		"serialproduct.functions":"10000000OOBA"
	},
	"credentialreturn":
	{[
		"otpid":, "123456status",
		//{"cctoken":"121212" // if verifyResponse is required
	}["id","serial","oobDeviceModel","oobDeviceType"]}
	]
}


Response:

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":1,
		"rows":
		[
			"id":"dda5f3744f7d7750676acc24f31fe1287085872ff856224655bf55ec501fa2ba","status":"ACTIVE",
			"token":
			{
				"id":"bc650db324ef8e2873444e9e1001ac07",
				"serial":"110000035",
				"oobDeviceModel":"Xiaomi M2007J20CG",
				"oobDeviceType":"Android"
			}
		]
	}
}

Anchor
_Toc341972349
_Toc341972349
/auth/logon

Examples 1: OTP login
Method:/auth/logon
Parameters:

Code Block
languagejs
{
	"application":
	{
		"id":"appid"
	},
    "remoteIp": "xxx.xxx.xxx.xxx", // client IP Address
    "user":
	{
		"id":"userid"
	},
	"token":
	{
		"serial":"10000000"
	},
	"credential":
	{
		"otp":"123456",
		//"cc":"121212" // if verifyResponse is required
	}
}

Examples 2: OOBA login
Method: /auth/logon
Parameters:

Code Block
languagejs
{
	"application":
	{
		"id":"appid"
	},
	"user":
	{
		"id":"userid"
	},
	"token":
	{
		"serial":"110000035"
	},
	"credential":
	{
		"method":"OOBA",
		"tokenId":"bc650db324ef8e2873444e9e1001ac07",
	}
}


Response:

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972350
_Toc341972350
/auth/logout

Examples:
Method:/auth/logout
Parameters:

...

Code Block
languagejs
{
	"error":0
}



Anchor
_Toc341972351
_Toc341972351
/auth/verify

Examples:
Method:/auth/verify
Parameters:

Code Block
languagejs
languagejs
{
    "remoteIp": "xxx.xxx.xxx.xxx", // client IP Address{
	"user":
	{
		"id":"userid"
	},
	"token": // optional
	{
		"serial":"10000000"
	},
	"credential":
	{
		"otp":"123456",
		//"cc":"121212" // if verifyResponse is required
	}
}

...

Code Block
languagejs
{
	"error":0
}

...


	}
}


Code Block
languagejs
{
	    "user":
	    {
		"id":userid
	},
	"token":
	{
		"serial":"10000000"
	},
	        "loginName":"loginName"
    },
    "credential":
	    {
		"otp        "method":"123456SPASS",
		"cc        "password":"13113131pass"
	    }
}


Response:

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972353
_Toc341972353
/auth/sendOTP

Examples:
Method:/auth/sendOTP
Parameters:

...

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972354
_Toc341972354
/auth/sendActivationCode

Examples:
Method:/auth/sendActivationCode
Parameters:

...

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972355
_Toc341972355
/auth/syncToken

Examples:
Method:/auth/syncToken
Parameters:

Code Block
languagejs
{
	"user":
	{
		"id":"userid"
	},
	"token":
	{
		"serial":"10000000"
	},
	"credential":"otp1,otp2"
}

...

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972356
_Toc341972356
/auth/downloadToken

Examples:
Method:/auth/downloadToken
Parameters:

Code Block
languagejs
{
	"user":
	{
		"id":"userid"
	},
	"token":
	{
		"serial":"10000000"
	},
	"acHash": "SHA1 hash of activation code in base64 encoded"
}

...

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972357
_Toc341972357
/auth/activateTokenAssignment

Examples:
Method:/auth/activateTokenAssignment
Parameters:

...

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972358
_Toc341972358
/auth/getPolicy

Parameters:

Code Block
languagejs
{
	"application":
	{
		"name":"appname"
	},
	"user":
	{
		"loginName":"login name",
		"domain.id":"domainid"
	},
	"category":
	{
		"name":"logon"
	},
	"return":["name", "id","options"]
}

...

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"id":"policy id 1",
		"name":"System logon policy",
		"options":
		{
			"key1":"value1",
			"key2":"value2",
			...
		}
	}
}


Anchor
_Toc341972360
_Toc341972360
/auth/listSiteStamps

Parameters:

Code Block
languagejs
{
	"user":
	{
		"id":"userid"
	}
	return:["*"]
}

Response:

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":2,
		"rows":
		[
			{"id":"id1", …},
			{"id":"id2", …}
		]
	}
}



Anchor
_Toc341972361
_

...

Toc341972361
/auth/getChallengeCode

...

Parameters:

Code Block
languagejs
 
\{
	"user":
\	{
		"loginName":"login name",
		"domain.id":"domainid"
\	},
	"token":
\	{
		"id":"tid1"
\	},
 	return:\["id", "code", "starts", "expires"\]
\}

Response:

Code Block
languagejs

\{
 	"error":0,
	"result":\{"id":1, "code":"xxx", "starts":"xxx", "expires:"xxx"\}
\}
\\
+Examples:+
The GridGo challenge code is the matrix in JSON string
\\
Parameters: 
\{
 "user":
\{
"loginName":"login name",
"domain.id":domainid
\},
"token":
\{
"product.method":"GridGo"
\},
\\
"return":\["id", "code", "reference"\]
\}
Response: 
\{
 "error":0,
 "result":
\{
 "id":"#i#_ChallengeCode_22",
"code":
'\{"grid":\["53c1s3npxgws4pw6jp5kx3",
"scmmu698wp9t1sag5spxzz",
"gmmzdj97x3jn4bpe9cvu1r",
"ps0hs5g2nh5xer6r93fj7x",
"mn8zbs5nnnm8rxt2r5ekd0",
"0jr935hx618a3vcvzdehn0",
"9xtr71jff7jaz255n5rtc4",
"dr96rxn7pgs3anmfzpeu7y",
"uf06ttmc3kfvhrun2remk9",
"z7c3ytf9u2xtfmc60p06ax"\],
"rows":10,
"cols":22,
"indiecs":"ABCDEFGHJKMNPRSTUVWXY"
\}',
"reference":"10948e64-b829-47be-be2a-414217bee16f"
\}
\}

...

":"xxx"}
}

Examples:
The GridGo challenge code is the matrix in JSON string

Code Block
languagejs
{
	"user":
	{
		"loginName":"login name",
		"domain.id":"domainid"
	},
	"token":
	{
		"product.method":"GridGo"
	},
	"return":["id", "code", "reference"]
}

Response:

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"id":"#i#_ChallengeCode_22",
		"code":
			"{\"grid\":[\"53c1s3npxgws4pw6jp5kx3\",
			\"scmmu698wp9t1sag5spxzz\",
			\"gmmzdj97x3jn4bpe9cvu1r\",
			\"ps0hs5g2nh5xer6r93fj7x\",
			\"mn8zbs5nnnm8rxt2r5ekd0\",
			\"0jr935hx618a3vcvzdehn0\",
			\"9xtr71jff7jaz255n5rtc4\",
			\"dr96rxn7pgs3anmfzpeu7y\",
			\"uf06ttmc3kfvhrun2remk9\",
			\"z7c3ytf9u2xtfmc60p06ax\"],
			\"rows\":10,
			\"cols\":22,
			\"indiecs\":\"ABCDEFGHJKMNPRSTUVWXY\"
			}",
		"reference":"10948e64-b829-47be-be2a-414217bee16f"
	}
}

Anchor
_Toc341972362
_Toc341972362
/auth/listTokens

Parameters:

Code Block
languagejs
{
	"user":
	{
		"loginName":"login name",
		"domain.id":"domainid"
	},
	"token":
	{
		"product.method":"GridCard"
	},
	"return":["id", "serial"]
}

Response:

Code Block
languagejs
{
	"error":0,
	"result":
	{
		"total":2,
		"rows":
		[
			{"id":"tid1", "serial":"77003456"},
			{"id":"tid2", "serial":"77003457"}
		]
	}
}

Anchor
_Toc341972363
_Toc341972363
/auth/changePassword

Examples:
Method:/auth/changePassword
Parameters:

Code Block
languagejs
{
	"user":
	{
		"loginName":"login name",
		"domain.id":"domainid"
	},
	"oldPassword":"old",
	"newPassword":"new"
}


Response:

Code Block
languagejs
{
	"error":0
}

Anchor
_Toc341972364
_Toc341972364
/auth/verifyPin

Wiki Markup
+Examples:+
Method:/auth/listTokens
Parameters: 
\{
 "user":
\{
"loginName":"login name",
"domain.id":domainid
\},
"token":
\{
"product.method":"GridCard"
\},
\\
"return":\["id", "serial"\]
\}
Response: 
\{
 "error":0,
 "result":
\{
 "total":2,
 "rows":
\[
 \{"id":1, "serial":"77003456"\},
\{"id":2, "serial":"77003457"\}
\]
\}
\}
\\

...

Examples:
Method:/auth/changePasswordverifyPin

1. verify password

Parameters:

Code Block
languagejs
{

...


	"user":

...


	{
		"loginName":"login name",

...


		"domain.id":"domainid

...

"
	},

...

Examples:
Method:/auth/verifyPin

  1. verify password

...


	"pin":"password"
}

2. verify pin

Parameters:

Code Block
languagejs
{
	"user":
	{
		"loginName":"login name",

...


		"domain.

...

id":"domainid"
	},
	"token":
	{
		"serial":"1213131"
	}
	"pin":"

...

pin"

...


}

Response:

Code Block
languagejs
{

...


	"error":0

...


}

3. verify pin by assignment

Parameters:{

Code Block
languagejs
{
	"user":

...


	{
		"loginName":"login name",

...


		"domain.id":"domainid

...

"
	},

...


	"

...

tokenAssignment":

...


	{
		"id":"

...

assignment id"
	}
	"pin":"pin"

...


}


Response:

Code Block
languagejs
{

...


	"error":0

...


}
  1. verify pin

...


/auth/resetLogon

Reset the logon session, this API will reset everything in the logon session: user, logon step, access control etc.

Request:

Code Block
languagejs
{
}

Response:

Code Block
languagejs
{
	"error":0

...


}