示例#1
0
 public RemoteConsole(string defaultPrompt) : base(defaultPrompt)
 {
     m_Server        = null;
     m_Config        = null;
     m_Scrollback    = new List <string>();
     m_DataEvent     = new ManualResetEvent(false);
     m_InputData     = new List <string>();
     m_LineNumber    = 0;
     m_Connections   = new Dictionary <UUID, ConsoleConnection>();
     m_AllowedOrigin = String.Empty;
     m_sigUtil       = new JWTSignatureUtil(publicKeyPath: "./server.crt");
 }
示例#2
0
        public RemoteAdmin()
        {
            AddCommand("session", "login_with_password", SessionLoginWithPassword);
            AddCommand("session", "login_with_token", SessionLoginWithToken);
            AddCommand("session", "logout", SessionLogout);

            AddCommand("Console", "Command", ConsoleCommandHandler);

            // AddCommand("GridService", "Shutdown", RegionShutdownHandler);

            sessionTimer          = new Timer(60000); // 60 seconds
            sessionTimer.Elapsed += sessionTimer_Elapsed;
            sessionTimer.Enabled  = true;
            m_sigUtil             = new JWTSignatureUtil(publicKeyPath: "./server.crt");
        }
示例#3
0
        public void ReadConfig(IConfigSource config)
        {
            m_Config = config;

            IConfig netConfig = m_Config.Configs["Network"];

            if (netConfig == null)
            {
                return;
            }

            m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", string.Empty);

            var certFilename = netConfig.GetString("SSLCertFile", string.Empty);

            if (!string.IsNullOrWhiteSpace(certFilename))
            {
                m_sigUtil = new JWTSignatureUtil(publicKeyPath: certFilename);
            }
        }
 public JWTUserAuthenticationGateway(IUserService userService)
 {
     _userService = userService;
     m_sigUtil    = new JWTSignatureUtil(privateKeyPath: "./server.p12", publicKeyPath: "./server.crt");
 }
 public JWTUserAuthenticationGateway(IUserService userService, string privateKeyPath, string publicKeyPath)
 {
     _userService = userService;
     m_sigUtil    = new JWTSignatureUtil(privateKeyPath, publicKeyPath);
 }