Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

« Previous Version 10 Next »

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 pin,
                               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
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.
pinshortThe pin associated with device for OTP Type that require a PIN
deviceIdshortThe deviceId to assign to this newly created device associated with this account. It is recommended you pass an empty string value.
onlyAddDevicebooltrue = add user and add the device device, false= just add user;  device will need to be added to user account later
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,
                               2,         // desktop token
                               1,         // time based otp 
                               6,         // otp digits
                               30,        // timewindow
                               false,     // 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_oath_user
firstNamestringFirst name
lastNamestringLast name
emailstringUser email. Used for sending email notifications nd temporary pass codes.
pwstringUsers password. If omitted one will be generated. If using Active Directory on the server this parameter is ignored.
mobilestringUsers mobile phone Used for sending voice or sms messages
notificationMethodshort

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

Sample REST/Json Method
 {
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "type": "add_oath_user",
  "firstName": "Mandy5",
  "lastName": "Mandy5",
  "email": "Mandy5",
  "pw": "Mandy5",
  "mobile": "407-555-1212",
  "notificationMethod": 0 
}

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


  • No labels