module Doorkeeper::Request

def authorization_strategy(strategy)

:code, :token
Available authorization strategies:
def authorization_strategy(strategy)
  get_strategy strategy
rescue NameError
  raise Errors::InvalidAuthorizationStrategy
end

def get_strategy(strategy)

def get_strategy(strategy)
  raise Errors::MissingRequestStrategy unless strategy.present?
  "Doorkeeper::Request::#{strategy.to_s.camelize}".constantize
end

def token_strategy(strategy)

:password, :client_credentials, :authorization_code, :refresh_token
Available token strategies:
def token_strategy(strategy)
  get_strategy strategy
rescue NameError
  raise Errors::InvalidTokenStrategy
end