Ejemplo n.º 1
0
        public async Task <IdentityResult> CreateAsync(LdapUser user, string password)
        {
            try
            {
                _ldapService.AddUser(user, password);
            }
            catch (Exception e)
            {
                return(await Task.FromResult(IdentityResult.Failed(new IdentityError()
                {
                    Code = "LdapUserCreateFailed", Description = e.Message ?? "The user could not be created."
                })));
            }

            return(await Task.FromResult(IdentityResult.Success));
        }