public void Authorize(AuthorizeVo authorizeVo, Action <IRestResponse <SentVerificationDTOSrv> > callback)
        {
            var url = $"{BaseUrl.SsoAddress}/oauth2/otp/authorize/{authorizeVo.Identity}";

            PrepareRestClient(url, authorizeVo, out var client, out var request, false);
            var parameter = request.Parameters.FirstOrDefault(_ => _.Name.Equals(nameof(authorizeVo.Identity).GetPodName()));

            request.Parameters.Remove(parameter);
            request.AddHeader(nameof(authorizeVo.Authorization).GetPodName(), authorizeVo.Authorization);
            callback(client.Execute <SentVerificationDTOSrv>(request));
        }
示例#2
0
 public static void GetPaymentMethods(AuthorizeVo authorizeVo, Action <IRestResponse <ResultSrv <ServiceCallResultSrv <PaymentMethodsSrv> > > > callback)
 {
     BaseService.PrepareRestClient(ServiceCallProducts.PaymentMethods, authorizeVo, PodParameterName.ParametersName, out var client,
                                   out var request);
     callback(client.Execute <ResultSrv <ServiceCallResultSrv <PaymentMethodsSrv> > >(request));
 }
示例#3
0
 public static void GetCities(AuthorizeVo authorizeVo, Action <IRestResponse <ResultSrv <ServiceCallResultSrv <CitiesSrv> > > > callback)
 {
     PrepareRestClient(ServiceCallProducts.Cities, authorizeVo, Method.GET, out var client, out var request);
     callback(client.Execute <ResultSrv <ServiceCallResultSrv <CitiesSrv> > >(request));
 }