示例#1
0
        public async Task<bool> ResetPasswordAsync(string email, string newPassword)
        {
            var postModel = new
            {                
                Email = email,
                NewPassword = newPassword
            };

            return await PostAsync<bool>(RelativePaths.ResetPassword, postModel);
        }
示例#2
0
        public async Task<SignOutStatus> SignOutAsync(string userName, string token)
        {
            var postModel = new
            {
                UserName = userName,
                Token = token
            };

            return await PostAsync<SignOutStatus>(RelativePaths.SignOut, postModel);
        }
示例#3
0
        public async Task<Tuple<object, RegisterStatus>> RegisterAsync(string userName, string password, string email)
        {
            var postModel = new
            {
                UserName = userName,
                Password = password,
                Email = email
            };

            return await PostAsync<Tuple<object, RegisterStatus>>(RelativePaths.Register, postModel);
        }
示例#4
0
        public async Task<Tuple<KoalaBlogIdentityObject, SignInStatus, string>> SignInAsync(string userName, string password, bool isPersistent)
        {
            var postModel = new
            {
                UserName = userName,
                Password = password,
                IsPersistent = isPersistent
            };

            return await PostAsync<Tuple<KoalaBlogIdentityObject, SignInStatus, string>>(RelativePaths.SignIn, postModel);
        }
示例#5
0
        public bool IsUserInRole(string userName, string[] rolesOrPermissionsName)
        {
            var postModel = new
            {
                UserName = userName,
                RolesOrPermissionsName = rolesOrPermissionsName
            };

            return PostSync<bool, object>(RelativePaths.IsUserInRole, postModel);
        }