Versions Compared

Key

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

WCF

 


Code Block
languagec#
titleValidateU2FUser Method
AuthServerU2FResponseAuthServerResponseValidateUser ValidateU2FUserValidateUser(string authServerPartnerLoginName, 
                      string authServerPartnerLoginPassword, 
                      string authServerPartnerUserLoginName, 
                      string authServerPartnerUserPassword,
                      bool noAuth);


WCF parameterdata typedescription
authServerPartnerLoginNamestring
SurePassId
SurePassID account login name
authServerPartnerLoginPasswordstring
SurePassId
SurePassID account login key
authServerPartnerUserLoginNamestringUser account login name
authServerPartnerUserPasswordstringUser account login password. If the server is setup to use Active Directory the user will be authenticated using AD.
noAuthboolfalse = verify user name and password;  true=verify username only and return user status


Code Block
languagec#
titleSample WCF C# Method
  AuthServerU2FResponseAuthServerResponseValidateUser resp = ValidateU2FUserValidateUser("accountKey", 
           "accountLogin", 
  "accountKey",          "Mandy", 
           "user password",
            true);


Code Block
languagec#
titleSample WCF C# Repsonse
 if (resp.ErrorCode != 0)  {
       message.Text = resp.ErrorMsg;
       return false;
 }

...


REST


REST parameterdata typedescription
spAccountLoginNamestring
SurePassId
SurePassID account login name
spAccountLoginKeystring
SurePassId
SurePassID account login key
usernamestringuser account login name
typestringvalidate
_u2f
_user
pwstringUser account login password. If the server is setup to use Active Directory the user will be authenticated using AD.
noAuthint0 = verify user name and password;  1=verify username only return user status


Code Block
languagejs
titleSample REST/Json Method
 {
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "type": "validate_u2f_user",
  "pw": "user password"
  "noAuth: 1
}


Code Block
languagejs
titleSample REST/Json Response - Failure
 {
  "errorCode": 9001,
  "errorMessage": "User login failure [Mandy]",
  "type": "validate_u2f_user"
}

 


...

Code Block
languagejs
titleSample REST/Json Response - Success noAuth
{
  "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"
}