Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Add a u2f device to an existing users account

WCF

Add User
AuthServerResponseEnrollUser   EnrollUser(String authServerPartnerLoginName,   
                               string  authServerPartnerLoginPassword,
                               string firstName,
                               string lastName,
                               string loginName,
                               string loginPassword,
                               string email,
                               string mobilePhone,
                               short deviceType,
                               short otpType,
                               short otpLength,	
                               short otpWindow,
                               string otpPin,
                               string deviceId, 
                               bool   addDeviceOnly,
                               short notificationMethod);
WCF parameterdata typedescription
authServerPartnerLoginNamestringSurePassId account login name
authServerPartnerLoginPasswordstringSurePassId account login key
firstNamestringFirst name
lastNamestringLast name
loginNamestringUser account login name
loginPasswordstringignored
emailstringignored
mobilePhonestringignored
deviceTypeshort12 - see Device Type
OtpTypeshort8 - see OTP Type
OtpLengthshortignored
OtpWindowshortignored
Otppinshortignored
deviceIdshortignored
onlyAddDevicebooltrue
notificationMethodshort

send welcome message to user.  0 = none, 1=email, 2=sms


Sample WCF C# Method
AuthServerResponseEnrollUser resp = EnrollUser("accountLogin", 
                              "accountKey",
                               "Mandy",
                               "Last",
                               "Mandy",
                               "M@5ndy58!",
                               Mandy5@myco.com,
                               "+1(407)555-1212,
                               12,        // fido device
                               8,         // u2f  
                               0,         // ignored
                               0,         // ignored 
                               "",        // ignored  
                               true,      // add user and this device 
                               0);
Sample WCF C# Repsonse
 if (resp.ErrorCode != 0)  {      
       message.Text = resp.ErrorMsg;
       return false;
 }


REST


REST parameterdata typedescription
spAccountLoginNamestringSurePassId account login name
spAccountLoginKeystringSurePassId account login key
usernamestringUser account login name
typestringadd_u2f_device
notificationMethodshort

send welcome message to user.  0 = none, 1=email, 2=sms

Sample REST/Json Method
 {
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "type": "add_u2f_device",
  "notificationMethod": 0 
}

Sample REST/Json Response
 {  
  "errorCode": 0,
  "errorMessage": "OK",
  "type": "add_u2f_device"
}


  • No labels