Ejemplo n.º 1
0
        /**
         * Initialise the encryptor.
         *
         * @param privateKey      the recipient's private key.
         * @param params          encoding and derivation parameters, may be wrapped to include an IV for an underlying block cipher.
         * @param publicKeyParser the parser for reading the ephemeral public key.
         */
        public void Init(AsymmetricKeyParameter privateKey, ICipherParameters @params, IKeyParser publicKeyParser)
        {
            ForEncryption = false;
            PrivParam     = privateKey;
            KeyParser     = publicKeyParser;

            ExtractParams(@params);
        }
        public ConsulConfigSource(IOptions <ConsulRegistryConfig> agentConfig)
        {
            var agentInfo = agentConfig?.Value ?? new ConsulRegistryConfig();

            _parser = agentInfo.KeyParser;

            _httpClient = HttpUtils.CreateClient(agentInfo.AgentAddress, agentInfo.AgentPort);
        }
Ejemplo n.º 3
0
        public ConsulConfigSource(IOptions <ConsulRegistryConfig> agentConfig, ILogger logger, IConsulAclProvider aclProvider = null)
        {
            _logger = logger;
            var agentInfo = agentConfig?.Value ?? new ConsulRegistryConfig();

            _parser = agentInfo.KeyParser;

            _httpClient = HttpUtils.CreateClient(aclProvider, agentInfo.AgentAddress, agentInfo.AgentPort);
        }
Ejemplo n.º 4
0
        public ConsulRegistry(IOptions <ConsulRegistryConfig> agentConfig)
        {
            var agentInfo = agentConfig?.Value ?? new ConsulRegistryConfig();

            _agentAddress = $"http://{agentInfo.AgentAddress}:{agentInfo.AgentPort}";
            _parser       = agentInfo.KeyParser;
            _httpClient   = new HttpClient()
            {
                BaseAddress = new Uri(_agentAddress)
            };
        }
Ejemplo n.º 5
0
 public void UpdateKeyParser(IKeyParser parser)
 {
     _parser = parser;
 }
 public void UpdateKeyParser(IKeyParser parser)
 {
 }