mirror of https://github.com/tp4a/teleport
parent
9b353f89c8
commit
f3e1b1e207
|
@ -6,7 +6,7 @@ from eom_app.app.configs import app_cfg
|
|||
from eom_app.module import host
|
||||
from eom_app.module import user
|
||||
from eom_common.eomcore.logger import *
|
||||
from .base import TPBaseUserAuthJsonHandler, TPBaseAdminAuthHandler, TPBaseAdminAuthJsonHandler
|
||||
from .base import TPBaseUserAuthHandler, TPBaseUserAuthJsonHandler, TPBaseAdminAuthHandler, TPBaseAdminAuthJsonHandler
|
||||
|
||||
cfg = app_cfg()
|
||||
|
||||
|
@ -16,7 +16,7 @@ class IndexHandler(TPBaseAdminAuthHandler):
|
|||
self.render('user/index.mako')
|
||||
|
||||
|
||||
class PersonalHandler(TPBaseAdminAuthHandler):
|
||||
class PersonalHandler(TPBaseUserAuthHandler):
|
||||
def get(self):
|
||||
user_info = self.get_current_user()
|
||||
self.render('user/personal.mako', user=user_info)
|
||||
|
|
|
@ -61,7 +61,9 @@ def verify_oath(user_id, oath_code):
|
|||
if len(db_ret) != 1:
|
||||
return False
|
||||
|
||||
oath_secret = db_ret[0][0]
|
||||
oath_secret = str(db_ret[0][0]).strip()
|
||||
if 0 == len(oath_secret):
|
||||
return False
|
||||
|
||||
return verify_oath_code(oath_secret, oath_code)
|
||||
|
||||
|
|
Loading…
Reference in New Issue