public async Task UpdateAsync(Models.Consent consent)
        {
            var item = await context.Consents
                       .Where(x => x.SubjectId == consent.Subject && x.ClientId == consent.ClientId)
                       .FirstOrDefaultAsync();

            if (item == null)
            {
                item = new Entities.Consent
                {
                    SubjectId = consent.Subject,
                    ClientId  = consent.ClientId
                };
                context.Consents.Add(item);
            }

            if (consent.Scopes == null || !consent.Scopes.Any())
            {
                context.Consents.Remove(item);
            }

            item.Scopes = consent.Scopes.StringifyScopes();

            await context.SaveChangesAsync();
        }
        public async Task RemoveAsync(string key)
        {
            var token = await _context.Tokens
                        .Where(x => x.Key == key && x.TokenType == _tokenType)
                        .FirstOrDefaultAsync();

            if (token != null)
            {
                _context.Tokens.Remove(token);
                await _context.SaveChangesAsync();
            }
        }