Пример #1
0
        public Task <IList <UserLoginInfo> > GetLoginsAsync(ApplicationUser user, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();

            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            IList <UserLoginInfo> result = _userLoginRepository.FindByUserId(user.Id)
                                           .Select(x => new UserLoginInfo(x.LoginProvider, x.ProviderKey, x.ProviderDisplayName))
                                           .ToList();

            return(Task.FromResult(result));
        }