Module: SinatraAuthToken
Defined Under Namespace
Modules: SinatraHelper
Constant Summary collapse
- @@auth_token =
nil
Instance Method Summary collapse
Instance Method Details
#auth_token ⇒ Object
13 14 15 |
# File 'lib/sinatra_auth_token.rb', line 13 def auth_token @@auth_token end |
#init_auth_token! ⇒ Object
17 18 19 20 |
# File 'lib/sinatra_auth_token.rb', line 17 def init_auth_token! @@auth_token = ENV["AUTH_TOKEN"] || SecureRandom.hex(8) STDOUT.puts "AUTH_TOKEN IS: #{@@auth_token}" end |