rack-oauth 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rack-oauth.rb +8 -8
  3. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -39,12 +39,12 @@ module Rack #:nodoc:
39
39
  #
40
40
  # You can use the token to make GET/POST/etc requests
41
41
  def get_access_token name = nil
42
- oauth(name).get_access_token(oauth_request_env)
42
+ oauth_instance(name).get_access_token(oauth_request_env)
43
43
  end
44
44
 
45
45
  # Same as #get_access_token but it clears the access token out of the session.
46
46
  def get_access_token! name = nil
47
- oauth(name).get_access_token!(oauth_request_env)
47
+ oauth_instance(name).get_access_token!(oauth_request_env)
48
48
  end
49
49
 
50
50
  # [Internal] this method returns the Rack 'env' for the current request.
@@ -63,7 +63,7 @@ module Rack #:nodoc:
63
63
  end
64
64
 
65
65
  # Returns the instance of Rack::OAuth given a name (defaults to the default Rack::OAuth name)
66
- def oauth name = nil
66
+ def oauth_instance name = nil
67
67
  oauth = Rack::OAuth.get(oauth_request_env, nil)
68
68
  raise "Couldn't find Rack::OAuth instance with name #{ name }" unless oauth
69
69
  oauth
@@ -71,7 +71,7 @@ module Rack #:nodoc:
71
71
 
72
72
  # Returns the path to rediret to for logging in via OAuth
73
73
  def oauth_login_path name = nil
74
- oauth(name).login_path
74
+ oauth_instance(name).login_path
75
75
  end
76
76
 
77
77
  end
@@ -104,10 +104,10 @@ module Rack #:nodoc:
104
104
  end
105
105
 
106
106
  DEFAULT_OPTIONS = {
107
- :login_path => '/oauth_login',
108
- :callback_path => '/oauth_callback',
109
- :redirect_to => '/oauth_complete',
110
- :rack_session => 'rack.session'
107
+ :login_path => '/oauth_login',
108
+ :callback_path => '/oauth_callback',
109
+ :redirect_to => '/oauth_complete',
110
+ :rack_session => 'rack.session'
111
111
  }
112
112
 
113
113
  # the URL that should initiate OAuth and redirect to the OAuth provider's login page
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - remi