---
cli/koji | 2 +-
koji/__init__.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/cli/koji b/cli/koji
index 42bce30..6df17c7 100755
--- a/cli/koji
+++ b/cli/koji
@@ -6687,7 +6687,7 @@ def handle_moshimoshi(options, session, args):
print "%s, %s!" % (random.choice(greetings), u["name"],)
print ""
print "You are using the hub at %s" % (session.baseurl,)
- authtype = u.get("authtype")
+ authtype = u.get('authtype', getattr(session, 'authtype', None))
if authtype == koji.AUTHTYPE_NORMAL:
print "Authenticated via password"
elif authtype == koji.AUTHTYPE_KERB:
diff --git a/koji/__init__.py b/koji/__init__.py
index a3d75d8..8e297dc 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -1594,6 +1594,7 @@ class ClientSession(object):
self.opts = opts
self._connection = None
self._setup_connection()
+ self.authtype = None
self.setSession(sinfo)
self.multicall = False
self._calls = []
@@ -1644,6 +1645,7 @@ class ClientSession(object):
self.callnum = None
# do we need to do anything else here?
self._setup_connection()
+ self.authtype = None
else:
self.logged_in = True
self.callnum = 0
@@ -1654,6 +1656,7 @@ class ClientSession(object):
if not sinfo:
return False
self.setSession(sinfo)
+ self.authtype = AUTHTYPE_NORMAL
return True
def subsession(self):
@@ -1724,6 +1727,7 @@ class ClientSession(object):
return False
self.setSession(sinfo)
+ self.authtype = AUTHTYPE_KERB
return True
def _serverPrincipal(self, cprinc):
@@ -1765,6 +1769,7 @@ class ClientSession(object):
self.opts['certs'] = certs
self.setSession(sinfo)
+ self.authtype = AUTHTYPE_SSL
return True
def logout(self):
--
2.1.0
Show replies by date