Add U2F Device

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"
}