Sha256: 3065db2c8f212070c9847cc1b7add855bde93fef338307a84cfbe00988e81481
Contents?: true
Size: 863 Bytes
Versions: 13
Compression:
Stored size: 863 Bytes
Contents
require 'securerandom' module DerailedBenchmarks # Base helper class. Can be used to authenticate different strategies # The root app will be wrapped by an authentication action class AuthHelper attr_reader :app # Put any coded needed to set up or initialize your authentication module here def setup raise "Must subclass" end # Gets called for every request. Place all auth logic here. # Return value is expected to be an valid Rack response array. # If you do not manually `app.call(env)` here, the client app # will never be called. def call(env) raise "Must subclass" end # Returns self and sets the target app def add_app(app) raise "App is required argument" unless app @app = app setup self end end end require 'derailed_benchmarks/auth_helpers/devise'
Version data entries
13 entries across 13 versions & 1 rubygems