public Task StoreAsync(IdentityServer4.Models.PersistedGrant grant) { //grant. uow.PersistedGrants.Add(new PersistedGrant() { ClientId = grant.ClientId, CreationTime = grant.CreationTime, Data = grant.Data, Expiration = grant.Expiration, Key = grant.Key, SubjectId = grant.SubjectId, Type = grant.Type }); uow.Complete(); //throw new NotImplementedException(); return(Task.CompletedTask); }
public Task <IdentityServer4.Models.PersistedGrant> GetAsync(string key) { var pg = uow.PersistedGrants.Find(p => p.Key == key).FirstOrDefault(); if (pg == null) { return(Task.FromResult <IdentityServer4.Models.PersistedGrant>(null)); } IdentityServer4.Models.PersistedGrant ps = new IdentityServer4.Models.PersistedGrant() { ClientId = pg.ClientId, CreationTime = pg.CreationTime, Data = pg.Data, Expiration = pg.Expiration, Key = pg.Key, SubjectId = pg.SubjectId, Type = pg.Type }; return(Task.FromResult <IdentityServer4.Models.PersistedGrant>(ps)); }