summaryrefslogtreecommitdiffstats
path: root/ipsilon/login/authkrb.py
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-09-10 17:20:02 -0400
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-09-24 20:51:47 +0200
commitb4bcb99e3217e658c1277cd5d484fa0c62c7aa0c (patch)
tree43ac5b08ed35f207eba1bc34dba89162d847a95f /ipsilon/login/authkrb.py
parente0895efb26de64a28de7b9219f524b715c396b2b (diff)
downloadipsilon-b4bcb99e3217e658c1277cd5d484fa0c62c7aa0c.tar.gz
ipsilon-b4bcb99e3217e658c1277cd5d484fa0c62c7aa0c.tar.xz
ipsilon-b4bcb99e3217e658c1277cd5d484fa0c62c7aa0c.zip
Use transactions throughout the code
Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon/login/authkrb.py')
-rwxr-xr-xipsilon/login/authkrb.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ipsilon/login/authkrb.py b/ipsilon/login/authkrb.py
index d5ceaf3..5f2d682 100755
--- a/ipsilon/login/authkrb.py
+++ b/ipsilon/login/authkrb.py
@@ -20,6 +20,7 @@
from ipsilon.login.common import LoginPageBase, LoginManagerBase
from ipsilon.login.common import FACILITY
from ipsilon.util.plugin import PluginObject
+from ipsilon.util.trans import Transaction
from string import Template
import cherrypy
import os
@@ -36,13 +37,15 @@ class Krb(LoginPageBase):
class KrbAuth(LoginPageBase):
def root(self, *args, **kwargs):
+ trans = Transaction('login', **kwargs)
# If we can get here, we must be authenticated and remote_user
# was set. Check the session has a user set already or error.
if self.user and self.user.name:
userdata = {'krb_principal_name': self.user.name}
- return self.lm.auth_successful(self.user.name, 'krb', userdata)
+ return self.lm.auth_successful(trans, self.user.name,
+ 'krb', userdata)
else:
- return self.lm.auth_failed()
+ return self.lm.auth_failed(trans)
class KrbError(LoginPageBase):
@@ -64,7 +67,7 @@ class KrbError(LoginPageBase):
cont=conturl)
# If we get here, negotiate failed
- return self.lm.auth_failed()
+ return self.lm.auth_failed(Transaction('login', **kwargs))
class LoginManager(LoginManagerBase):