Beispiel #1
0
        public Task <IList <RefreshTokenModel> > GetAllAsync()
        {
            var dal = _tokenRepository.GetAll();

            if (dal == null)
            {
                return(Task.FromResult <IList <RefreshTokenModel> >(null));
            }
            else
            {
                List <RefreshTokenModel> list = new List <RefreshTokenModel>();
                foreach (RefreshToken obj in dal)
                {
                    list.Add(new RefreshTokenModel
                    {
                        Id              = obj.Id,
                        RefToken        = obj.RefToken,
                        ClientId        = obj.ClientId,
                        UserName        = obj.UserName,
                        IssuedUtc       = obj.IssuedUtc,
                        ExpiresUtc      = obj.ExpiresUtc,
                        ProtectedTicket = obj.ProtectedTicket,
                        InsertedBy      = obj.InsertedBy,
                        InsertedDate    = obj.InsertedDate,
                        UpdatedBy       = obj.UpdatedBy,
                        UpdatedDate     = obj.UpdatedDate
                    });
                }

                return(Task.FromResult <IList <RefreshTokenModel> >(list));
            }
        }
Beispiel #2
0
        public List <RefreshToken> GetAllRefreshTokens()
        {
            var refreshTokens = _refreshTokenRepository.GetAll().ToList();

            return(refreshTokens);
        }
 public List <RefreshToken> GetAll()
 {
     return(_refreshTokenRepository.GetAll().ToList());
 }
Beispiel #4
0
 public IEnumerable <RefreshTokenModel> GetAll()
 {
     return(_refreshTokenRepository.GetAll());
 }
Beispiel #5
0
 private List <RefreshToken> GetAllRefreshTokens()
 {
     return(_refreshTokenRepository.GetAll( ).ToList( ));
 }