Update utils.py (#579)

pull/595/head
中国娃 2017-07-28 20:42:16 +08:00 committed by 老广
parent 5ffd1f99fd
commit 67e953902b
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ def check_user_valid(**kwargs):
return None, _('Password or SSH public key invalid')
def refresh_token(token, user, expiration=3600):
def refresh_token(token, user, expiration=settings.CONFIG.TOKEN_EXPIRATION or 3600):
cache.set(token, user.id, expiration)