Sha256: 284b3c8b7bc5be170461f0b88f8055f48bdef179e2d1e7a3e70e8c36ee2be292

Contents?: true

Size: 548 Bytes

Versions: 2

Compression:

Stored size: 548 Bytes

Contents

require 'omniauth/strategies/oauth2'

module OmniAuth
  module Strategies
    class Surveymonkey < OmniAuth::Strategies::OAuth2

      option :name, "surveymonkey"

      option :client_options, {
        :site => "https://api.surveymonkey.com",
        :authorize_url => '/oauth/authorize',
        :token_url => '/oauth/token'
      }

      option :authorize_options, [:api_key]
      
      def callback_phase
        options[:client_options][:token_url] = "/oauth/token?api_key=#{options[:api_key]}"
        super
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
omniauth-surveymonkey2-0.0.9 lib/omniauth/strategies/surveymonkey.rb
omniauth-surveymonkey-1.0.0 lib/omniauth/strategies/surveymonkey.rb