Beispiel #1
0
 public ApiResponse <LoginRadiusUserIdentity> CreateAccount(UserIdentityCreateModel userIdentity)
 {
     Validate(new ArrayList {
         userIdentity.Email, userIdentity.Password
     });
     return(ConfigureAndExecute <LoginRadiusUserIdentity>(RequestType.Identity, HttpMethod.Post, null,
                                                          userIdentity.ConvertToJson()));
 }
Beispiel #2
0
        public ApiResponse <LoginRadiusPostResponse> PhoneUserRegistrationbySMS(SottDetails _SottDetails,
                                                                                LoginRadiusApiOptionalParams _LoginRadiusApiOptionalParams,
                                                                                UserIdentityCreateModel _UserIdentityCreateModel)
        {
            var additionalparams = new QueryParameters();

            if (string.IsNullOrEmpty(_LoginRadiusApiOptionalParams.VerificationUrl))
            {
                additionalparams.Add("verificationUrl", _LoginRadiusApiOptionalParams.VerificationUrl);
            }
            if (string.IsNullOrEmpty(_LoginRadiusApiOptionalParams.SmsTemplate))
            {
                additionalparams.Add("smsTemplate", _LoginRadiusApiOptionalParams.SmsTemplate);
            }


            var timediffrence = new QueryParameters {
                ["timedifference"] = _SottDetails.Sott.TimeDifference
            };

            if (_SottDetails.Sott.StartTime == null)
            {
                ApiResponse <SottDetails> sottresponse =
                    ConfigureAndExecute <SottDetails>(RequestType.ServerInfo, HttpMethod.Get, null, timediffrence);

                if (sottresponse.Response != null)
                {
                    _SottDetails = sottresponse.Response;
                }
            }

            additionalparams.Add("sott", LoginRadiusSecureOneTimeToken.GetSott(_SottDetails));

            return(ConfigureAndExecute <LoginRadiusPostResponse>(RequestType.Authentication, HttpMethod.Post, "register",
                                                                 additionalparams, _UserIdentityCreateModel.ConvertToJson()));
        }
Beispiel #3
0
        public ApiResponse <LoginRadiusPostResponse> RegisterCustomer(UserIdentityCreateModel socialUserProfile,
                                                                      LoginRadiusApiOptionalParams optionalParams, SottDetails _SottDetails)
        {
            var additionalQueryParams = new QueryParameters();

            additionalQueryParams.AddOptionalParamsRange(optionalParams);
            var timediffrence = new QueryParameters {
                ["timedifference"] = _SottDetails.Sott.TimeDifference
            };

            if (_SottDetails.Sott.StartTime == null)
            {
                ApiResponse <SottDetails> sottresponse =
                    ConfigureAndExecute <SottDetails>(RequestType.ServerInfo, HttpMethod.Get, null, timediffrence);

                if (sottresponse.Response != null)
                {
                    _SottDetails = sottresponse.Response;
                }
            }

            additionalQueryParams.Add("sott", GetSott(_SottDetails));
            return(ConfigureAndExecute <LoginRadiusPostResponse>(RequestType.Authentication, HttpMethod.Post,
                                                                 _resoucePath.ToString(),
                                                                 additionalQueryParams, socialUserProfile.ConvertToJson()));
        }