Module: SimpleApiAuth
- Defined in:
- lib/simple_api_auth/railtie.rb,
lib/simple_api_auth/simple_api_auth.rb
Defined Under Namespace
Classes: Middleware, Railtie
Class Method Summary collapse
Class Method Details
.generate(length = 40) ⇒ Object
31 32 33 34 |
# File 'lib/simple_api_auth/simple_api_auth.rb', line 31 def self.generate(length = 40) require "digest/sha1" Digest::SHA1.hexdigest(Time.now.to_s + rand(99999999).to_s)[0..length-1] end |