public async Task <IEnumerable <PersistedGrant> > GetAllAsync(string subjectId) { if (string.IsNullOrWhiteSpace(subjectId)) { return(new List <PersistedGrant>()); } var db = await _redisCache.GetDatabaseAsync(); var keys = await db.ListRangeAsync(subjectId); var list = new List <PersistedGrant>(); foreach (string key in keys) { var items = await db.HashGetAllAsync(key); list.Add(GetPersistedGrant(items)); } return(list); }