Class: OmniAuth::Strategies::Eklase

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/eklase.rb

Instance Method Summary collapse

Instance Method Details

#callback_urlObject

The callback should match the redirect_uri that was passed in request phase, so ?code=:code must be removed.



40
41
42
# File 'lib/omniauth/strategies/eklase.rb', line 40

def callback_url
  full_host + script_name + callback_path
end

#clientObject

Log everything. Fix content-type for query string responses.



31
32
33
34
35
36
# File 'lib/omniauth/strategies/eklase.rb', line 31

def client
  super.tap do |c|
    c.connection.response :logger, OmniAuth.logger
    c.connection.use OmniAuth::Eklase::FormMimeTypeFixMiddleware
  end
end

#raw_infoObject



44
45
46
47
48
49
# File 'lib/omniauth/strategies/eklase.rb', line 44

def raw_info
  @raw_info ||= begin
    response = access_token.get("/Auth/OAuth/API/Me?access_token=#{access_token.token}")
    MultiXml.parse(response.body)
  end
end