Class: Steppe::Endpoint::SecurityStep

Inherits:
Object
  • Object
show all
Defined in:
lib/steppe/endpoint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scheme, scopes: []) ⇒ SecurityStep

Returns a new instance of SecurityStep.



308
309
310
311
312
313
# File 'lib/steppe/endpoint.rb', line 308

def initialize(scheme, scopes: [])
  @scheme = scheme
  @scopes = scopes
  @header_schema = scheme.respond_to?(:header_schema) ? scheme.header_schema : Types::Hash
  @query_schema = scheme.respond_to?(:query_schema) ? scheme.query_schema : Types::Hash
end

Instance Attribute Details

#header_schemaObject (readonly)

Returns the value of attribute header_schema.



306
307
308
# File 'lib/steppe/endpoint.rb', line 306

def header_schema
  @header_schema
end

#query_schemaObject (readonly)

Returns the value of attribute query_schema.



306
307
308
# File 'lib/steppe/endpoint.rb', line 306

def query_schema
  @query_schema
end

Instance Method Details

#call(conn) ⇒ Object



315
316
317
# File 'lib/steppe/endpoint.rb', line 315

def call(conn)
  @scheme.handle(conn, @scopes) 
end