def login(self):
        session = koji.ClientSession(self.kojihub)
        kwargs = {}
        if self.koji_proxy_user:
            kwargs['proxyuser'] = self.koji_proxy_user

        if self.koji_ssl_certs:
            # Use certificates
            self.log.info("Using SSL certificates for Koji authentication")
            session.ssl_login(os.path.join(self.koji_ssl_certs, 'cert'),
                              os.path.join(self.koji_ssl_certs, 'ca'),
                              os.path.join(self.koji_ssl_certs, 'serverca'),
                              **kwargs)
        else:
            # Use Kerberos
            self.log.info("Using Kerberos for Koji authentication")
            if self.koji_principal and self.koji_keytab:
                kwargs['principal'] = self.koji_principal
                kwargs['keytab'] = self.koji_keytab

            session.krb_login(**kwargs)

        return session
Implementation of the FetchQueues RPC.
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/plugins/exit_koji_promote.py/KojiPromotePlugin.login--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/taskqueue/taskqueue_stub.py/_Group.FetchQueues_Rpc