Class: Doorkeeper::GrantFlow::Flow
- Inherits:
-
Object
- Object
- Doorkeeper::GrantFlow::Flow
- Defined in:
- lib/doorkeeper/grant_flow/flow.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#grant_type_matches ⇒ Object
readonly
Returns the value of attribute grant_type_matches.
-
#grant_type_strategy ⇒ Object
readonly
Returns the value of attribute grant_type_strategy.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#response_mode_matches ⇒ Object
readonly
Returns the value of attribute response_mode_matches.
-
#response_type_matches ⇒ Object
readonly
Returns the value of attribute response_type_matches.
-
#response_type_strategy ⇒ Object
readonly
Returns the value of attribute response_type_strategy.
Instance Method Summary collapse
- #default_response_mode ⇒ Object
- #handles_grant_type? ⇒ Boolean
- #handles_response_type? ⇒ Boolean
-
#initialize(name, **options) ⇒ Flow
constructor
A new instance of Flow.
- #matches_grant_type?(value) ⇒ Boolean
- #matches_response_mode?(value) ⇒ Boolean
- #matches_response_type?(value) ⇒ Boolean
Constructor Details
#initialize(name, **options) ⇒ Flow
Returns a new instance of Flow.
10 11 12 13 14 15 16 17 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 10 def initialize(name, **) @name = name @grant_type_matches = [:grant_type_matches] @grant_type_strategy = [:grant_type_strategy] @response_type_matches = [:response_type_matches] @response_type_strategy = [:response_type_strategy] @response_mode_matches = [:response_mode_matches] end |
Instance Attribute Details
#grant_type_matches ⇒ Object (readonly)
Returns the value of attribute grant_type_matches.
6 7 8 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 6 def grant_type_matches @grant_type_matches end |
#grant_type_strategy ⇒ Object (readonly)
Returns the value of attribute grant_type_strategy.
6 7 8 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 6 def grant_type_strategy @grant_type_strategy end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 6 def name @name end |
#response_mode_matches ⇒ Object (readonly)
Returns the value of attribute response_mode_matches.
6 7 8 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 6 def response_mode_matches @response_mode_matches end |
#response_type_matches ⇒ Object (readonly)
Returns the value of attribute response_type_matches.
6 7 8 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 6 def response_type_matches @response_type_matches end |
#response_type_strategy ⇒ Object (readonly)
Returns the value of attribute response_type_strategy.
6 7 8 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 6 def response_type_strategy @response_type_strategy end |
Instance Method Details
#default_response_mode ⇒ Object
35 36 37 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 35 def default_response_mode response_mode_matches[0] end |
#handles_grant_type? ⇒ Boolean
19 20 21 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 19 def handles_grant_type? grant_type_matches.present? end |
#handles_response_type? ⇒ Boolean
23 24 25 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 23 def handles_response_type? response_type_matches.present? end |
#matches_grant_type?(value) ⇒ Boolean
27 28 29 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 27 def matches_grant_type?(value) grant_type_matches === value end |
#matches_response_mode?(value) ⇒ Boolean
39 40 41 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 39 def matches_response_mode?(value) response_mode_matches.include?(value) end |
#matches_response_type?(value) ⇒ Boolean
31 32 33 |
# File 'lib/doorkeeper/grant_flow/flow.rb', line 31 def matches_response_type?(value) response_type_matches === value end |