Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)
The ExternalCredentials class allows the connection to use EXTERNAL
authentication, generally with a client SSL certificate.

src/s/y/synapse-agent-HEAD/synapse/amqp.py   synapse-agent(Download)
from pika.adapters import SelectConnection
from pika.adapters.select_connection import SelectPoller
from pika.credentials import PlainCredentials, ExternalCredentials
 
from synapse.logger import logger
            pika_options['port'] = self.ssl_port
            if self.ssl_auth:
                pika_options['credentials'] = ExternalCredentials()
                pika_options['ssl_options'] = {
                    'ca_certs': self.cacertfile,

src/p/i/pika-HEAD/tests/credentials_tests.py   pika(Download)
    def test_response_for(self):
        obj = credentials.ExternalCredentials()
        start = spec.Connection.Start()
        start.mechanisms = 'PLAIN EXTERNAL'
        self.assertEqual(obj.response_for(start), ('EXTERNAL', ''))
 
    def test_erase_response_for_no_mechanism_match(self):
        obj = credentials.ExternalCredentials()
    def test_erase_credentials(self):
        with mock.patch('pika.credentials.LOGGER', autospec=True) as logger:
            obj = credentials.ExternalCredentials()
            obj.erase_credentials()
            logger.debug.assert_called_once_with('Not supported by this '