summaryrefslogtreecommitdiffstats
path: root/lib/zorglub/session.rb
blob: b119e2b6edd1ac991e79af9a301a312bf754bbe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- coding: UTF-8 -*-
#
require 'securerandom'
#
module Zorglub
    #
    Config.session_id_length ||= 64
    Config.session_ttl ||= (60 * 60 * 24 * 5)
    #
    class Session
        #
        def gen_session_id
            SecureRandom.hex Config.session_id_length
        end
        #
    end
    #
end
#
# EOF