Add U2F Device

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 parameter

data type

description

WCF parameter

data type

description

authServerPartnerLoginName

string

SurePassID account login name

authServerPartnerLoginPassword

string

SurePassID account login key

firstName

string

First name

lastName

string

Last name

loginName

string

User account login name

loginPassword

string

ignored

email

string

ignored

mobilePhone

string

ignored

deviceType

short

12 - see Device Type

OtpType

short

8 - see OTP Type

OtpLength

short

ignored

OtpWindow

short

ignored

Otppin

short

ignored

deviceId

short

ignored

onlyAddDevice

bool

true

notificationMethod

short

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 parameter

data type

description

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

add_u2f_device

notificationMethod

short

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