Extended the session timeout to 6 hours.

This commit is contained in:
Jonathan Bernard 2013-10-15 14:26:38 +00:00
parent 774778ee55
commit 0278179452
2 changed files with 3 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
build/
*.sw?
*.beam
.sass-cache

View File

@ -10,7 +10,7 @@ new(Username) ->
Session = #ts_api_session{
username = Username,
expires = Seconds + 12*24*24
expires = Seconds + 60*60*6
},
CookieVal = yaws_api:new_cookie_session(Session),
@ -47,8 +47,8 @@ get_session(YArg) ->
% cookie is fresh
true ->
% update the expiry time
NewSession = Session#ts_api_session{expires = NowSeconds + 12*24*24},
% update the expiry time 6 hours: sec min hr
NewSession = Session#ts_api_session{expires = NowSeconds + 60*60* 6},
yaws_api:replace_cookie_session(CookieVal, NewSession),
% return cookie