Пример #1
0
        public virtual async Task RemoveAsync(string key)
        {
            var persistedGrant = await _persistentGrantRepository.FindByKeyAsync(key);

            if (persistedGrant == null)
            {
                return;
            }

            await _persistentGrantRepository.DeleteAsync(persistedGrant);
        }
        public async Task DeleteBySubjectIdAndClientId()
        {
            await _persistentGrantRepository.DeleteAsync("PersistedGrantSubjectId1", "PersistedGrantClientId1");

            var persistedGrants = await _persistentGrantRepository.GetListAsync();

            persistedGrants.ShouldNotBeEmpty();
            persistedGrants.ShouldNotContain(x =>
                                             x.Key == "PersistedGrantKey1" && x.SubjectId == "PersistedGrantSubjectId1" &&
                                             x.ClientId == "PersistedGrantClientId1");
        }
 public Task DeleteAsync(
     string subjectId,
     string clientId,
     string type
     )
 {
     return(PersistentGrantRepository.DeleteAsync(subjectId, clientId, type));
 }
Пример #4
0
        public async Task DeleteAsync(Guid id)
        {
            var persistedGrant = await _repository.FindAsync(id);

            await _repository.DeleteAsync(persistedGrant);
        }