示例#1
0
 public async Task <Response <bool> > ForgetPassword(AccountInput input)
 {
     ValidateHelper.Begin()
     .IsEmail(input.Email);
     _memberSerevice = new MemberSerevice();
     return(await _memberSerevice.ForgetPassword(input.Email));
 }
示例#2
0
 public async Task <Response <bool> > UpdatePassword(UpdatePasswordInput input)
 {
     //確保資訊安全傳輸有幾種方式
     // 1. 以網路層擋,僅限定特定IP讀取
     // 2. 透過token協定
     ValidateHelper.Begin()
     .IsPasswordFomat(input.Password)
     .NotNull(input.Token);
     _memberSerevice = new MemberSerevice();
     return(await _memberSerevice.UpdatePassword(input));
 }
示例#3
0
        public async Task <Response <string> > Login(LoginInput input)
        {
            try
            {
                ValidateHelper.Begin()
                .IsPasswordFomat(input.Password)
                .IsEmail(input.Email);
                _memberSerevice = new MemberSerevice();
                var result = await _memberSerevice.Login(input);

                return(result);
            }
            catch (Exception e)
            {
                return(new Response <string>()
                {
                    Success = false,
                    Message = e.Message,
                });
            }
        }
示例#4
0
 public async Task <Response <bool> > IsAccountExistedAsync(AccountInput input)
 {
     _memberSerevice = new MemberSerevice();
     return(await _memberSerevice.IsAccountExisted(input.Email));
 }