Module CASServer::Utils
In: lib/casserver/utils.rb

Methods

Public Instance methods

[Source]

    # File lib/casserver/utils.rb, line 16
16:     def log_controller_action(controller, params)
17:       $LOG << "\n"
18: 
19:       /`(.*)'/.match(caller[1])
20:       method = $~[1]
21: 
22:       if params.respond_to? :dup
23:         params2 = params.dup
24:         params2['password'] = '******' if params2['password']
25:       else
26:         params2 = params
27:       end
28:       $LOG.debug("Processing #{controller}::#{method} #{params2.inspect}")
29:     end

[Source]

    # File lib/casserver/utils.rb, line 6
 6:     def random_string(max_length = 29)
 7:       rg =  Crypt::ISAAC.new
 8:       max = 4294619050
 9:       r = "#{Time.now.to_i}r%X%X%X%X%X%X%X%X" %
10:         [rg.rand(max), rg.rand(max), rg.rand(max), rg.rand(max),
11:          rg.rand(max), rg.rand(max), rg.rand(max), rg.rand(max)]
12:       r[0..max_length-1]
13:     end

[Validate]