public Task <Client> FindClientByIdAsync(string clientId) { using (var context = new AuthServerDbContext()) { var client = context.Clients.SingleOrDefault(x => x.Id == clientId); var result = new Client() { ClientName = client.Name, ClientId = client.Id.ToString(), Enabled = true, AccessTokenType = AccessTokenType.Reference, Flow = Flows.ResourceOwner, ClientSecrets = new List <Secret> { new Secret(client.SecretHash) }, AllowedScopes = new List <string> { "AuthApi" } }; return(Task.FromResult(result)); } }
public UserRepository(AuthServerDbContext context) { _context = context; }
public GenericRepository(AuthServerDbContext context) { _context = context; _dbSet = context.Set <T>(); }
public UnitOfWork(AuthServerDbContext context) { _context = context; }