Class: Steppe::Endpoint::SecurityStep
- Inherits:
-
Object
- Object
- Steppe::Endpoint::SecurityStep
- Defined in:
- lib/steppe/endpoint.rb
Instance Attribute Summary collapse
-
#header_schema ⇒ Object
readonly
Returns the value of attribute header_schema.
-
#query_schema ⇒ Object
readonly
Returns the value of attribute query_schema.
Instance Method Summary collapse
- #call(conn) ⇒ Object
-
#initialize(scheme, scopes: []) ⇒ SecurityStep
constructor
A new instance of SecurityStep.
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_schema ⇒ Object (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_schema ⇒ Object (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 |