module Doorkeeper::Request
Public Instance Methods
get_strategy(grant_or_request_type, available)
click to toggle source
# File lib/doorkeeper/request.rb, line 24 def get_strategy(grant_or_request_type, available) fail Errors::MissingRequestStrategy unless grant_or_request_type.present? fail NameError unless available.include?(grant_or_request_type.to_s) strategy_class(grant_or_request_type) end
strategy_class(grant_or_request_type)
click to toggle source
# File lib/doorkeeper/request.rb, line 40 def strategy_class(grant_or_request_type) strategy_class_name = grant_or_request_type.to_s.tr(' ', '_').camelize "Doorkeeper::Request::#{strategy_class_name}".constantize end
token_grant_types()
click to toggle source
# File lib/doorkeeper/request.rb, line 35 def token_grant_types Doorkeeper.configuration.token_grant_types end
token_strategy(grant_type)
click to toggle source
# File lib/doorkeeper/request.rb, line 18 def token_strategy(grant_type) get_strategy grant_type, token_grant_types rescue NameError raise Errors::InvalidTokenStrategy end