Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
from ipsilon.login.common import LoginFormBase, LoginManagerBase
from ipsilon.login.common import FACILITY
from ipsilon.util.plugin import PluginObject
from ipsilon.login.common import LoginFormBase, LoginManagerBase
from ipsilon.login.common import FACILITY
from ipsilon.util.plugin import PluginObject
import pam
import subprocess
import pam
import subprocess
ok = pam.authenticate(username, password)
if ok:
ok = pam.authenticate(username, password)
if ok:
- cherrypy.log("User %s successfully authenticated." % username)
+ self.log("User %s successfully authenticated." % username)
- cherrypy.log("User %s failed authentication." % username)
+ self.log("User %s failed authentication." % username)
return None
def POST(self, *args, **kwargs):
return None
def POST(self, *args, **kwargs):
return self.lm.auth_successful(self.trans, user, 'password')
else:
error = "Authentication failed"
return self.lm.auth_successful(self.trans, user, 'password')
else:
error = "Authentication failed"
- cherrypy.log.error(error)
else:
error = "Username or password is missing"
else:
error = "Username or password is missing"
- cherrypy.log.error("Error: " + error)
+ self.error("Error: " + error)
context = self.create_tmpl_context(
username=username,
context = self.create_tmpl_context(
username=username,