WCF
Code Block | ||||
---|---|---|---|---|
| ||||
AuthServerU2FResponseAuthServerResponse ValidateOTP(string authServerPartnerLoginName, string authServerPartnerLoginPassword, string authServerPartnerUserLoginName, string authOtp, string printedSerialNumber); |
...
WCF parameter | data type | description |
---|---|---|
authServerPartnerLoginName | string | SurePassId SurePassID account login name |
authServerPartnerLoginPassword | string | SurePassId SurePassID account login key |
authServerPartnerUserLoginName | string | User account login name |
authOtp | string | Passcode to be verified. Usually sent by Send Passcode API |
printedSerialNumber | string | A specific device assigned to this user. If this is left empty then the first device assigned |
Code Block | ||||
---|---|---|---|---|
| ||||
AuthServerU2FResponse AuthServerResponse resp = ValidateOTP("accountLogin", "accountKey", "Mandy", "123456", string.Empty); |
...
Code Block | ||||
---|---|---|---|---|
| ||||
|
...
if (resp.ErrorCode != 0) {
message.Text = resp.ErrorMsg;
return false;
} |
REST
REST parameter | data type | description |
---|---|---|
spAccountLoginName | string | SurePassId SurePassID account login name |
spAccountLoginKey | string | SurePassId SurePassID account login key |
username | string | user account login name |
type | string | validate_oath_otp |
code | string | Passcode to be verified |
psn | string | A specific device assigned to this user. If this is left empty then the first device assigned |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "username": "Mandy", "spAccountLoginName": "accountLogin", "spAccountLoginKey": "acccountKey", "type": "validate_oath_otp", "otp": "123456", "psn": "" } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "errorCode": 9003, "errorMessage": "OTP [EVENT] [TSFT-001242] FAILED - [123456] outside window [size=30] or invalid. ", "type": "validate_oath_otp" } |
...