Class: Webhookdb::Service::Auth::Skip

Inherits:
Object
  • Object
show all
Defined in:
lib/webhookdb/service/auth.rb

Overview

Custom auth strategies can check if their child app is a :skip auth, and if so, skip auth. Allows unauthed endpoints under authed endpoints.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app, *_args) ⇒ Skip

Returns a new instance of Skip.



83
84
85
# File 'lib/webhookdb/service/auth.rb', line 83

def initialize(app, *_args)
  @app = app
end

Class Method Details

.skip?(app) ⇒ Boolean

Returns:

  • (Boolean)


79
80
81
# File 'lib/webhookdb/service/auth.rb', line 79

def self.skip?(app)
  return app.options[:type] == :skip
end

Instance Method Details

#call(env) ⇒ Object



87
88
89
# File 'lib/webhookdb/service/auth.rb', line 87

def call(env)
  return @app.call(env)
end