WCF
Code Block | ||||
---|---|---|---|---|
| ||||
AuthServerResponseValidateUser ValidateUser(string authServerPartnerLoginName,
string authServerPartnerLoginPassword,
string authServerPartnerUserLoginName,
string authServerPartnerUserPassword,
bool noAuth); |
WCF parameter | data type | description |
---|
authServerPartnerLoginName | string |
SurePassID account login name |
authServerPartnerLoginPassword | string |
SurePassID account login key |
authServerPartnerUserLoginName | string | User account login name |
authServerPartnerUserPassword | string | User account login password. If the server is setup to use Active Directory the user will be authenticated using AD. |
noAuth | bool | false = verify user name and password; true=verify username only and return user status |
Code Block | ||||
---|---|---|---|---|
| ||||
AuthServerU2FResponseAuthServerResponseValidateUser resp = ValidateU2FUserValidateUser("accountKey", "accountLogin", "accountKey "Mandy", "user password", true); |
Code Block | ||||
---|---|---|---|---|
| ||||
if (resp.ErrorCode != 0) { message.Text = resp.ErrorMsg; return false; } |
REST
REST parameter | data type | description |
---|---|---|
spAccountLoginName | string |
SurePassID account login name | |
spAccountLoginKey | string |
SurePassID account login key | ||
username | string | user account login name |
type | string | validate_ |
user | ||
pw | string | User account login password. If the server is setup to use Active Directory the user will be authenticated using AD. |
noAuth | int | 0 = verify user name and password; 1=verify username only return user status |
Code Block | ||||
---|---|---|---|---|
| ||||
{ "username": "Mandy", "spAccountLoginName": "accountLogin", "spAccountLoginKey": "accountKey", "type": "validate_u2f_user", "pw": "user password" "noAuth: 1 } |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"errorCode": 9001,
"errorMessage": "User login failure [Mandy]",
"type": "validate_u2f_user"
} |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{
"Devices": [
{
"psn": "TSFT-001277",
"deviceType": 12,
"otpType": 8,
"deviceStatus": 0
},
{
"psn": "TSFT-001279",
"deviceType": 13,
"otpType": 1,
"deviceStatus": 0
},
{
"psn": "TSFT-001281",
"deviceType": 8,
"otpType": 1,
"deviceStatus": 0
}
],
"userStatus": 0,
"errorCode": 0,
"errorMessage": "OK",
"type": "validate_user"
} |