public System.Threading.Tasks.Task <registerResponse> registerAsync(AccountRequest accountRequest, AccountTypes accountType, SignatureData[] signature)
        {
            registerRequest inValue = new registerRequest();

            inValue.accountRequest = accountRequest;
            inValue.accountType    = accountType;
            inValue.signature      = signature;
            return(((RecipientPortv3)(this)).registerAsync(inValue));
        }
示例#2
0
        public async Task <IActionResult> Register([FromBody] registerRequest request)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var result = await _userService.Register(request);

            if (!result)
            {
                return(BadRequest("Register is unsuccessful"));
            }
            return(Ok("Register successful"));
        }
示例#3
0
        public async Task <bool> Register(registerRequest request)
        {
            var user = new AppUser()
            {
                UserName = request.userName,
                //Password = request.password,
                Firstname   = request.firstName,
                Lastname    = request.lastName,
                PhoneNumber = request.phoneNumber,
                Email       = request.Email
            };
            var result = await _userManager.CreateAsync(user, request.password);

            if (result.Succeeded)
            {
                return(true);
            }
            return(false);
        }
        private void TryRegister()
        {
            if (TextBoxRegisterPassword.Text != TextBoxRepeatPassword.Password)
            {
                MessageBox.Show("Passwords do not match", "Password error", MessageBoxButton.OK, MessageBoxImage.Warning);
                ClearPassword();
            }
            else
            {
                try
                {
                    var             client  = new EventsPortClient("EventsPortSoap11");
                    registerRequest request = new registerRequest();
                    request.username = TextBoxRegisterLogin.Text;
                    request.password = TextBoxRegisterPassword.Text;
                    registerResponse response = client.register(request);

                    if (response.status == opStatusCode.FAULT)
                    {
                        MessageBox.Show("User with that username already exists", "Username taken", MessageBoxButton.OK, MessageBoxImage.Error);
                        ClearPassword();
                    }
                    else if (response.status == opStatusCode.OK)
                    {
                        RegisteredUser = new User
                        {
                            Username = TextBoxRegisterLogin.Text,
                            IsAdmin  = false,
                            Password = TextBoxRegisterPassword.Text
                        };
                        DialogResult = true;
                        MessageBox.Show("Account successfully created", "Registration success", MessageBoxButton.OK, MessageBoxImage.Information);
                        Close();
                    }
                }
                catch (Exception e)
                {
                    System.Console.WriteLine(e.Message);
                }
            }
        }
 public byte[] GetCertificate(byte[] binCsr)
 {
     //ZustellServiceRC rc;
     registerRequest request = new registerRequest(binCsr);
     if (iniChannel == null)
     {
         LastRC = CallOpenInit();
         if (LastRC != ZustellServiceRC.OK)
         {
             Log.Error("Open Channel fehlgeschlagen: rc={LastRC}", CallerInfo.Create(), LastRC);
             return null;
         }
     }
     var resp = CallGetCertificate(request);
     if (LastRC!= ZustellServiceRC.OK)
     {
         Log.Error("GetCertificate fehlgeschlagen: rc={LastRC}",CallerInfo.Create(), LastRC);
         return null;
     }
     return resp.processAuthenticationCSRResponse;
 }
 private registerResponse CallGetCertificate(registerRequest request)
 {
     return CallService(() => iniClient.register(request));
 }
 System.Threading.Tasks.Task <registerResponse> RecipientPortv3.registerAsync(registerRequest request)
 {
     return(base.Channel.registerAsync(request));
 }