コード例 #1
0
        public async Task <bool> SignUp()
        {
            RestReturnObj <UserToken> returnObj =
                await _restService.UserAuthRequest("Signup", _userData);

            if (returnObj.IsSuccess)
            {
                return(true);
            }
            return(false);
        }
コード例 #2
0
        public async Task <bool> Login()
        {
            var tokenPersistanceService = new TokenPersistanceService();

            RestReturnObj <UserToken> returnObj =
                await _restService.UserAuthRequest("Login", _userData);

            if (returnObj.IsSuccess)
            {
                string token   = returnObj.Obj.Token;
                bool   success = tokenPersistanceService.SaveToken(token);
                return(success);
            }
            return(false);
        }