Hi,
想咨询一下,关于 OmniAuth 能否跳过获取 token 阶段? 主要是因为目前正在写一个淘宝客网站登录淘宝的登录 gem,国内一些使用 OmniAuth 的公司,不按常理出牌,部分服务的登录方式,根据不需要换取令牌,所以想咨询一下,能否手工设置跳过获取 token 阶段?
他们的文档如下: http://open.taobao.com/doc/detail.htm?id=974
我的代码如下:
require 'omniauth/strategies/oauth2'
module OmniAuth
  module Strategies
    class Taobaoke < OmniAuth::Strategies::OAuth2
      option :name, "taobaoke"
      option :client_options, {
        :site => 'https://oauth.taobao.com/',
        :authorize_url => '/authorize',
        #:token_url => "/token"
      }
      option :authorize_params, {
        :response_type => 'user'
      }
      info do 
        { 
          :nickname => raw_info['nick'],
        }
      end
      extra do
        {
          #:raw_info => raw_info
        }
      end
      def raw_info
      end
    end
  end
end
OmniAuth.config.add_camelization('taobaoke', 'Taobaoke')