Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup

  • Loading branch information...
commit 24cc19fa7361853f619b082e9933687ff7d48663 1 parent fe63cbb
@sferik sferik authored
Showing with 30 additions and 79 deletions.
  1. +1 −1  oa-oauth/lib/omniauth/strategies/oauth/evernote.rb
  2. +1 −1  oa-oauth/lib/omniauth/strategies/oauth/google.rb
  3. +1 −1  oa-oauth/lib/omniauth/strategies/oauth/google_health.rb
  4. +1 −1  oa-oauth/lib/omniauth/strategies/oauth/google_health_sandbox.rb
  5. +1 −1  oa-oauth/lib/omniauth/strategies/oauth/hyves.rb
  6. +5 −5 oa-oauth/lib/omniauth/strategies/oauth/identica.rb
  7. +0 −2  oa-oauth/lib/omniauth/strategies/oauth/linked_in.rb
  8. +6 −7 oa-oauth/lib/omniauth/strategies/oauth/meetup.rb
  9. +4 −1 oa-oauth/lib/omniauth/strategies/oauth/miso.rb
  10. +3 −3 oa-oauth/lib/omniauth/strategies/oauth/netflix.rb
  11. +1 −1  oa-oauth/lib/omniauth/strategies/oauth/plurk.rb
  12. +2 −2 oa-oauth/lib/omniauth/strategies/oauth/rdio.rb
  13. +0 −4 oa-oauth/lib/omniauth/strategies/oauth/sound_cloud.rb
  14. +0 −4 oa-oauth/lib/omniauth/strategies/oauth/t163.rb
  15. +0 −4 oa-oauth/lib/omniauth/strategies/oauth/tqq.rb
  16. +0 −2  oa-oauth/lib/omniauth/strategies/oauth/trade_me.rb
  17. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/trip_it.rb
  18. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/tsina.rb
  19. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/tsohu.rb
  20. +0 −2  oa-oauth/lib/omniauth/strategies/oauth/tumblr.rb
  21. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/twitter.rb
  22. +0 −4 oa-oauth/lib/omniauth/strategies/oauth/type_pad.rb
  23. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/vimeo.rb
  24. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/yahoo.rb
  25. +0 −1  oa-oauth/lib/omniauth/strategies/oauth/yammer.rb
  26. +0 −3  oa-oauth/lib/omniauth/strategies/oauth/you_tube.rb
  27. +0 −1  oa-oauth/lib/omniauth/strategies/oauth2/bitly.rb
  28. +0 −1  oa-oauth/lib/omniauth/strategies/oauth2/dailymile.rb
  29. +1 −1  oa-oauth/lib/omniauth/strategies/oauth2/doit.rb
  30. +1 −1  oa-oauth/lib/omniauth/strategies/oauth2/foursquare.rb
  31. +0 −3  oa-oauth/lib/omniauth/strategies/oauth2/mailru.rb
  32. +0 −1  oa-oauth/lib/omniauth/strategies/oauth2/mixi.rb
  33. +1 −1  oa-oauth/lib/omniauth/strategies/oauth2/salesforce.rb
  34. +1 −1  oa-oauth/lib/omniauth/strategies/oauth2/thirty_seven_signals.rb
  35. +0 −1  oa-oauth/lib/omniauth/strategies/oauth2/vkontakte.rb
View
2  oa-oauth/lib/omniauth/strategies/oauth/evernote.rb
@@ -40,7 +40,7 @@ def user_info
def user_data
@user_data ||= begin
- user_store_url = consumer.site + '/edam/user'
+ user_store_url = 'https://www.evernote.com/edam/user'
client = ::Evernote::Client.new(::Evernote::EDAM::UserStore::UserStore::Client, user_store_url, {})
client.getUser(@access_token.token)
end
View
2  oa-oauth/lib/omniauth/strategies/oauth/google.rb
@@ -14,8 +14,8 @@ module Strategies
class Google < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
- :token_url => 'https://www.google.com/accounts/OAuthGetAccessToken',
:authorize_url => 'https://www.google.com/accounts/OAuthAuthorizeToken',
+ :token_url => 'https://www.google.com/accounts/OAuthGetAccessToken',
}
google_contacts_auth = "www.google.com/m8/feeds"
options[:scope] ||= "http://#{google_contacts_auth}"
View
2  oa-oauth/lib/omniauth/strategies/oauth/google_health.rb
@@ -14,8 +14,8 @@ module Strategies
class GoogleHealth < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
- :token_url => 'https://www.google.com/accounts/OAuthGetAccessToken',
:authorize_url => 'https://www.google.com/accounts/OAuthAuthorizeToken',
+ :token_url => 'https://www.google.com/accounts/OAuthGetAccessToken',
}
super(app, :google_health, consumer_key, consumer_secret, client_options, options)
View
2  oa-oauth/lib/omniauth/strategies/oauth/google_health_sandbox.rb
@@ -14,8 +14,8 @@ module Strategies
class GoogleHealthSandbox < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
- :token_url => 'https://www.google.com/accounts/OAuthGetAccessToken',
:authorize_url => 'https://www.google.com/accounts/OAuthAuthorizeToken',
+ :token_url => 'https://www.google.com/accounts/OAuthGetAccessToken',
}
super(app, :google_health_sandbox, consumer_key, consumer_secret, client_options, options)
View
2  oa-oauth/lib/omniauth/strategies/oauth/hyves.rb
@@ -10,7 +10,7 @@ def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
:authorize_url => 'http://www.hyves.nl/api/authorize',
:token_url => token_url,
:http_method => :get,
- :scheme => :header
+ :scheme => :header,
}
super(app, :hyves, consumer_key, consumer_secret, client_options, options, &block)
end
View
10 oa-oauth/lib/omniauth/strategies/oauth/identica.rb
@@ -13,11 +13,11 @@ module Strategies
#
class Identica < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
- super(app, :identica, consumer_key, consumer_secret,
- {
- :token_url => 'http://identi.ca/api/oauth/access_token',
- :authorize_url => 'http://identi.ca/api/oauth/authorize',
- }, options, &block)
+ client_options = {
+ :authorize_url => 'http://identi.ca/api/oauth/authorize',
+ :token_url => 'http://identi.ca/api/oauth/access_token',
+ }
+ super(app, :identica, consumer_key, consumer_secret, client_options, options, &block)
end
def auth_hash
View
2  oa-oauth/lib/omniauth/strategies/oauth/linked_in.rb
@@ -9,9 +9,7 @@ def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
:authorize_url => 'https://api.linkedin.com/uas/oauth/authorize',
:token_url => 'https://api.linkedin.com/uas/oauth/accessToken',
}
-
client_options[:authorize_url] = '/uas/oauth/authenticate' unless options[:sign_in] == false
-
super(app, :linked_in, consumer_key, consumer_secret, client_options, options, &block)
end
View
13 oa-oauth/lib/omniauth/strategies/oauth/meetup.rb
@@ -17,13 +17,12 @@ class Meetup < OmniAuth::Strategies::OAuth
# @param [String] consumer_secret the application consumer secret
# @option options [Boolean, true] :sign_in When true, use a sign-in flow instead of the authorization flow.
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
- auth_path = (options[:sign_in] == false) ? 'http://www.meetup.com/authorize' : 'http://www.meetup.com/authenticate'
-
- super(app, :meetup, consumer_key, consumer_secret,
- {
- :token_url => 'https://api.meetup.com/oauth/access',
- :authorize_url => auth_path,
- }, options)
+ authorize_url = (options[:sign_in] == false) ? 'http://www.meetup.com/authorize' : 'http://www.meetup.com/authenticate'
+ client_options = {
+ :authorize_url => authorize_url,
+ :token_url => 'https://api.meetup.com/oauth/access',
+ }
+ super(app, :meetup, consumer_key, consumer_secret, client_options, options)
end
def auth_hash
View
5 oa-oauth/lib/omniauth/strategies/oauth/miso.rb
@@ -13,7 +13,10 @@ module Strategies
#
class Miso < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
- super(app, :miso, consumer_key, consumer_secret, {:site => 'https://gomiso.com'}, options)
+ client_options = {
+ :site => 'https://gomiso.com',
+ }
+ super(app, :miso, consumer_key, consumer_secret, client_options, options)
end
def auth_hash
View
6 oa-oauth/lib/omniauth/strategies/oauth/netflix.rb
@@ -10,11 +10,11 @@ module Strategies
#
class Netflix < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
- opts = {
- :token_url => 'http://api.netflix.com/oauth/access_token',
+ client_options = {
:authorize_url => 'https://api-user.netflix.com/oauth/login',
+ :token_url => 'http://api.netflix.com/oauth/access_token',
}
- super(app, :netflix, consumer_key, consumer_secret, opts, options, &block)
+ super(app, :netflix, consumer_key, consumer_secret, client_options, options, &block)
end
def request_phase
View
2  oa-oauth/lib/omniauth/strategies/oauth/plurk.rb
@@ -18,8 +18,8 @@ class Plurk < OmniAuth::Strategies::OAuth
# @param [String] consumer_secret App secret registered on plurk
def initialize(app, consumer_key=nil, consumer_secret=nil, options = {}, &block)
client_options = {
- :token_url => 'http://www.plurk.com/OAuth/access_token',
:authorize_url => 'http://www.plurk.com/OAuth/authorize',
+ :token_url => 'http://www.plurk.com/OAuth/access_token',
}
super(app, :plurk, consumer_key, consumer_secret, client_options, options)
end
View
4 oa-oauth/lib/omniauth/strategies/oauth/rdio.rb
@@ -10,11 +10,11 @@ module Strategies
#
class Rdio < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
- opts = {
+ client_options = {
:token_url => 'http://api.rdio.com/oauth/access_token',
:authorize_url => 'https://www.rdio.com/oauth/authorize',
}
- super(app, :rdio, consumer_key, consumer_secret, opts, options, &block)
+ super(app, :rdio, consumer_key, consumer_secret, client_options, options, &block)
end
def auth_hash
View
4 oa-oauth/lib/omniauth/strategies/oauth/sound_cloud.rb
@@ -3,15 +3,11 @@
module OmniAuth
module Strategies
- #
# Authenticate to SoundCloud via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::SoundCloud, 'consumerkey', 'consumersecret'
- #
-
class SoundCloud < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
View
4 oa-oauth/lib/omniauth/strategies/oauth/t163.rb
@@ -3,16 +3,12 @@
module OmniAuth
module Strategies
- #
# Authenticate to T163 via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::T163, 'APIKey', 'APIKeySecret'
- #
class T163 < OmniAuth::Strategies::OAuth
-
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
@api_key = consumer_key
client_options = {
View
4 oa-oauth/lib/omniauth/strategies/oauth/tqq.rb
@@ -3,16 +3,12 @@
module OmniAuth
module Strategies
- #
# Authenticate to Tqq via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::Tqq, 'APIKey', 'APIKeySecret'
- #
class Tqq < OmniAuth::Strategies::OAuth
-
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
@api_key = consumer_key
client_options = {
View
2  oa-oauth/lib/omniauth/strategies/oauth/trade_me.rb
@@ -3,11 +3,9 @@
module OmniAuth
module Strategies
- #
# Authenticate to TradeMe via OAuth and retrieve basic user information.
# Usage:
# use OmniAuth::Strategies::TradeMe, 'consumerkey', 'consumersecret'
- #
class TradeMe < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
View
3  oa-oauth/lib/omniauth/strategies/oauth/trip_it.rb
@@ -2,13 +2,10 @@
module OmniAuth
module Strategies
- #
# Authenticate to TripIt via OAuth and retrieve an access token for API usage
#
# Usage:
- #
# use OmniAuth::Strategies::TripIt, 'consumerkey', 'consumersecret'
- #
class TripIt < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
View
3  oa-oauth/lib/omniauth/strategies/oauth/tsina.rb
@@ -3,14 +3,11 @@
module OmniAuth
module Strategies
- #
# Authenticate to TSina via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::TSina, 'APIKey', 'APIKeySecret'
- #
class Tsina < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
View
3  oa-oauth/lib/omniauth/strategies/oauth/tsohu.rb
@@ -3,14 +3,11 @@
module OmniAuth
module Strategies
- #
# Authenticate to Tsohu via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::Tsohu, 'APIKey', 'APIKeySecret'
- #
class Tsohu < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
View
2  oa-oauth/lib/omniauth/strategies/oauth/tumblr.rb
@@ -2,14 +2,12 @@
module OmniAuth
module Strategies
- #
# Authenticate to Tumblr via OAuth and retrieve basic
# user information.
#
# Usage:
#
# use OmniAuth::Strategies::Tumblr, 'consumerkey', 'consumersecret'
- #
class Tumblr < OmniAuth::Strategies::OAuth
# Initialize the middleware
#
View
3  oa-oauth/lib/omniauth/strategies/oauth/twitter.rb
@@ -3,14 +3,12 @@
module OmniAuth
module Strategies
- #
# Authenticate to Twitter via OAuth and retrieve basic
# user information.
#
# Usage:
#
# use OmniAuth::Strategies::Twitter, 'consumerkey', 'consumersecret'
- #
class Twitter < OmniAuth::Strategies::OAuth
# Initialize the middleware
#
@@ -19,7 +17,6 @@ def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
:site => 'https://api.twitter.com',
}
-
options[:authorize_params] = {:force_login => 'true'} if options.delete(:force_login) == true
client_options[:authorize_path] = '/oauth/authenticate' unless options[:sign_in] == false
super(app, :twitter, consumer_key, consumer_secret, client_options, options)
View
4 oa-oauth/lib/omniauth/strategies/oauth/type_pad.rb
@@ -3,16 +3,12 @@
module OmniAuth
module Strategies
- #
# Authenticate to Typepad via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::Typepad, 'consumerkey', 'consumersecret', :application_id => 'my_type_pad_application_id'
- #
# application_id is required.
- #
class TypePad < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
# TypePad uses the application ID for one of the OAuth paths.
View
3  oa-oauth/lib/omniauth/strategies/oauth/vimeo.rb
@@ -3,13 +3,10 @@
module OmniAuth
module Strategies
- #
# Authenticate to Vimeo via OAuth and retrieve basic user information.
#
# Usage:
- #
# use OmniAuth::Strategies::Vimeo, 'consumerkey', 'consumersecret'
- #
class Vimeo < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
View
3  oa-oauth/lib/omniauth/strategies/oauth/yahoo.rb
@@ -3,14 +3,11 @@
module OmniAuth
module Strategies
- #
# Authenticate to Yahoo via OAuth and retrieve basic
# user information.
#
# Usage:
- #
# use OmniAuth::Strategies::Yahoo, 'consumerkey', 'consumersecret'
- #
class Yahoo < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
View
1  oa-oauth/lib/omniauth/strategies/oauth/yammer.rb
@@ -9,7 +9,6 @@ def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
:authorize_url => 'https://www.yammer.com/oauth/authorize',
:token_url => 'https://www.yammer.com/oauth/access_token',
}
-
super(app, :yammer, consumer_key, consumer_secret, client_options, options)
end
View
3  oa-oauth/lib/omniauth/strategies/oauth/you_tube.rb
@@ -5,13 +5,10 @@
module OmniAuth
module Strategies
- #
# Authenticate to YouTube via OAuth and retrieve basic user info.
#
# Usage:
- #
# use OmniAuth::Strategies::YouTube, 'consumerkey', 'consumersecret'
- #
class YouTube < OmniAuth::Strategies::OAuth
def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block)
client_options = {
View
1  oa-oauth/lib/omniauth/strategies/oauth2/bitly.rb
@@ -3,7 +3,6 @@
module OmniAuth
module Strategies
- #
# Authenticate to Bitly utilizing OAuth 2.0 and retrieve
# basic user information.
#
View
1  oa-oauth/lib/omniauth/strategies/oauth2/dailymile.rb
@@ -3,7 +3,6 @@
module OmniAuth
module Strategies
- #
# Authenticate to DailyMile utilizing OAuth 2.0 and retrieve
# basic user information.
#
View
2  oa-oauth/lib/omniauth/strategies/oauth2/doit.rb
@@ -15,7 +15,7 @@ def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
protected
def user_data
- @data ||= MultiJson.decode(@access_token.get(client.site+"/v1/settings"),{'Authorization'=> 'OAuth'+@access_token.token})
+ @data ||= MultiJson.decode(@access_token.get('https://openapi.doit.im/v1/settings'), {'Authorization' => 'OAuth' + @access_token.token})
end
def request_phase
View
2  oa-oauth/lib/omniauth/strategies/oauth2/foursquare.rb
@@ -12,7 +12,7 @@ def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
options[:sign_in] ||= true
client_options = {
:authorize_url => authorize_url(options),
- :token_url => 'https://foursquare.com/oauth2/access_token'
+ :token_url => 'https://foursquare.com/oauth2/access_token',
}
super(app, :foursquare, client_id, client_secret, client_options, options, &block)
end
View
3  oa-oauth/lib/omniauth/strategies/oauth2/mailru.rb
@@ -3,7 +3,6 @@
module OmniAuth
module Strategies
- #
# Authenticate to Vkontakte utilizing OAuth 2.0 and retrieve
# basic user information.
# documentation available here:
@@ -20,9 +19,7 @@ def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
:authorize_url => 'https://connect.mail.ru/oauth/authorize',
:token_url => 'https://connect.mail.ru/oauth/token',
}
-
@private_key = options[:private_key]
-
super(app, :mailru, client_id, client_secret, client_options, options, &block)
end
View
1  oa-oauth/lib/omniauth/strategies/oauth2/mixi.rb
@@ -15,7 +15,6 @@ def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
:authorize_url => 'https://mixi.jp/connect_authorize.pl',
:token_url => 'https://secure.mixi-platform.com/2/token',
}
-
super(app, :mixi, client_id, client_secret, client_options, options, &block)
end
View
2  oa-oauth/lib/omniauth/strategies/oauth2/salesforce.rb
@@ -5,8 +5,8 @@ module Strategies
class Salesforce < OmniAuth::Strategies::OAuth2
def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
client_options = {
- :token_url => 'https://login.salesforce.com/services/oauth2/token',
:authorize_url => 'https://login.salesforce.com/services/oauth2/authorize',
+ :token_url => 'https://login.salesforce.com/services/oauth2/token',
}
options.merge!(:response_type => 'code', :grant_type => 'authorization_code')
super(app, :salesforce, client_id, client_secret, client_options, options, &block)
View
2  oa-oauth/lib/omniauth/strategies/oauth2/thirty_seven_signals.rb
@@ -7,7 +7,7 @@ class ThirtySevenSignals < OmniAuth::Strategies::OAuth2
def initialize(app, client_id=nil, client_secret=nil, options={}, &block)
client_options = {
:authorize_url => 'https://launchpad.37signals.com/authorization/new',
- :token_url => 'https://launchpad.37signals.com/authorization/token'
+ :token_url => 'https://launchpad.37signals.com/authorization/token',
}
super(app, :thirty_seven_signals, client_id, client_secret, client_options, options, &block)
end
View
1  oa-oauth/lib/omniauth/strategies/oauth2/vkontakte.rb
@@ -3,7 +3,6 @@
module OmniAuth
module Strategies
- #
# Authenticate to Vkontakte utilizing OAuth 2.0 and retrieve
# basic user information.
# documentation available here:
Please sign in to comment.
Something went wrong with that request. Please try again.