Module: Rack::Authenticate

Defined in:
lib/rack/authenticate.rb,
lib/rack/authenticate/client.rb,
lib/rack/authenticate/version.rb,
lib/rack/authenticate/middleware.rb,
lib/rack/authenticate/cors_middleware.rb

Defined Under Namespace

Classes: CORSMiddleware, Client, Middleware

Constant Summary collapse

VERSION =
"0.6.0"

Class Method Summary collapse

Class Method Details

.new_secret_keyObject



3
4
5
6
7
8
# File 'lib/rack/authenticate.rb', line 3

def self.new_secret_key
  require 'base64'
  require 'securerandom'
  require 'digest/sha2'
  Base64.encode64(Digest::SHA2.new(512).digest(SecureRandom.random_bytes(512))).chomp
end