class Doorkeeper::GrantFlow::Flow

Attributes

grant_type_matches[R]
grant_type_strategy[R]
name[R]
response_mode_matches[R]
response_type_matches[R]
response_type_strategy[R]

Public Class Methods

new(name, **options) click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 10
def initialize(name, **options)
  @name = name
  @grant_type_matches = options[:grant_type_matches]
  @grant_type_strategy = options[:grant_type_strategy]
  @response_type_matches = options[:response_type_matches]
  @response_type_strategy = options[:response_type_strategy]
  @response_mode_matches = options[:response_mode_matches]
end

Public Instance Methods

default_response_mode() click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 35
def default_response_mode
  response_mode_matches[0]
end
handles_grant_type?() click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 19
def handles_grant_type?
  grant_type_matches.present?
end
handles_response_type?() click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 23
def handles_response_type?
  response_type_matches.present?
end
matches_grant_type?(value) click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 27
def matches_grant_type?(value)
  grant_type_matches === value
end
matches_response_mode?(value) click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 39
def matches_response_mode?(value)
  response_mode_matches.include?(value)
end
matches_response_type?(value) click to toggle source
# File lib/doorkeeper/grant_flow/flow.rb, line 31
def matches_response_type?(value)
  response_type_matches === value
end