Versions Compared

Key

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

Add an Oath device to an existing users account

WCF


Code Block
languagec#
titleAdd 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 SurePassID account login name
authServerPartnerLoginPasswordstringSurePassId SurePassID account login key
firstNamestringFirst name
lastNamestringLast name
loginNamestringUser account login name
loginPasswordstringUsers password. If omitted one will be generated. If using Active Directory on the server this parameter is ignored.
emailstringUser email. Used for sending email notifications and temporary pass codes.
mobilePhonestringUsers mobile phone Used for sending voice or sms messages
deviceTypeshortDevice Type
OtpTypeshortOTP Type
OtpLengthshortThe length of the desired OTP. 
OtpWindowshortThe sliding window for OTP validation.  For event based OTP Type this is the number of values > than the event counter that will be accepted. For time based OTP Type this is the number of seconds that will elapse before the OTP will change.
OtppinshortThe pin associated with device for OTP Type that require a PIN
deviceIdshortThe serial number to be assigned to the newly created device associated with this account. It is recommended you pass an empty string value.  The actual devicedId will be returned in the response.
onlyAddDevicebooltrue
notificationMethodshort

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


...

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


REST


REST parameterdata typedescription
spAccountLoginNamestringSurePassId SurePassID account login name
spAccountLoginKeystringSurePassId SurePassID account login key
usernamestringUser account login name
typestringadd_oath_device
deviceTypeshortDevice Type
OtpTypeshortOTP Type
OtpLengthshortThe length of the desired OTP. 
windowSizeshortThe sliding window for OTP validation.  For event based OTP Type this is the number of values > than the event counter that will be accepted. For time based OTP Type this is the number of seconds that will elapse before the OTP will change.
OtpPinshortThe pin associated with device for OTP Type that require a PIN
timeDriftshortThe number of allowable time drift increments to be used as part of the calculation.
psnstringThe device serial number for the device.  If this field is not specified then a serial number will be generated by the system. For hardware devices such as FOBS this field is recommended since these devices usually come serialized. For soft devices such as mobile otp generators, it is recommended to not specify a serial number and let the system create one automatically. The generated serial number will be returned in the response.
secretKeyHexstringThe secret key (in hex format) for the device.  If this field is not specified then a secure secret key will be generated by the system. For hardware devices such as FOBS this field is recommended since these devices usually come with predefined keys. For soft devices such as mobile otp generators, it is recommended to not specify a secret key and let the system create one automatically.
secretKeyHexBase64stringThe secret key (Base64 format) for the device.  If this field is not specified then a secure secret key will be generated by the system. For hardware devices such as FOBS this field is recommended since these devices usually come with predefined keys. For soft devices such as mobile otp generators, it is recommended to not specify a secret key and let the system create one automatically.
notificationMethodshort

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

...