Esempio n. 1
0
 public DeviceController(
     ClientConnectionsRepository clientConnections,
     AppSettings settings,
     Ssh ssh)
 {
     this.clientConnections = clientConnections;
     this.settings          = settings;
     this.ssh = ssh;
 }
Esempio n. 2
0
 public DeveloperController(
     Ssh ssh,
     ClientConnectionsRepository clientConnectionsRepository,
     DeveloperAuthorizationsRepository developerAuthorizationsRepository,
     DeviceRequestsRepository deviceRequestsRepository)
 {
     this.ssh = ssh;
     this.developerAuthorizationsRepository = developerAuthorizationsRepository;
     this.deviceRequestsRepository          = deviceRequestsRepository;
     this.clientConnectionsRepository       = clientConnectionsRepository;
 }
Esempio n. 3
0
        private void CheckActiveDeviceConnections()
        {
            List <string> deactivatedClients = new List <string>();

            using (sshondemandContext dbContext = new sshondemandContext())
            {
                ClientConnectionsRepository clientConnections = new ClientConnectionsRepository(dbContext);
                clientConnections.ResetOldConnections(15, out deactivatedClients);
            }
            Ssh ssh = new Ssh(settings);

            ssh.UnloadClientKeys(deactivatedClients);
        }