proletarian-oauth 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,6 +187,10 @@ module OAuth
187
187
  @options[:authorize_url]!=nil
188
188
  end
189
189
 
190
+ def authenticate_url?
191
+ @options[:authenticate_url]!=nil
192
+ end
193
+
190
194
  def access_token_url
191
195
  @options[:access_token_url]||site+access_token_path
192
196
  end
data/lib/oauth/server.rb CHANGED
@@ -10,6 +10,7 @@ module OAuth
10
10
  :request_token_path=>"/oauth/request_token",
11
11
  :authorize_path=>"/oauth/authorize",
12
12
  :access_token_path=>"/oauth/access_token"
13
+ :authenticate_path=>'/oauth/authenticate',
13
14
  }
14
15
  # Create a new server instance
15
16
  def initialize(base_url,paths={})
@@ -35,6 +36,7 @@ module OAuth
35
36
  :site=>base_url,
36
37
  :request_token_path=>request_token_path,
37
38
  :authorize_path=>authorize_path,
39
+ :authenticate_path=>authenticate_path,
38
40
  :access_token_path=>access_token_path
39
41
  })
40
42
  end
@@ -54,6 +56,14 @@ module OAuth
54
56
  def authorize_url
55
57
  base_url+authorize_path
56
58
  end
59
+
60
+ def authenticate_path
61
+ @paths[:authenticate_path]
62
+ end
63
+
64
+ def authenticate_url
65
+ base_url+authenticate_path
66
+ end
57
67
 
58
68
  def access_token_path
59
69
  @paths[:access_token_path]
data/lib/oauth/token.rb CHANGED
@@ -59,6 +59,11 @@ module OAuth
59
59
  def authorize_url
60
60
  consumer.authorize_url+"?oauth_token="+CGI.escape(token)
61
61
  end
62
+
63
+ # Returns the authentication url that you need to use for redirecting the user
64
+ def authenticate_url
65
+ consumer.authenticate_url+"?oauth_token="+CGI.escape(token)
66
+ end
62
67
 
63
68
  # exchange for AccessToken on server
64
69
  def get_access_token(options={})
data/oauth.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{oauth}
5
- s.version = "0.3.6"
5
+ s.version = "0.3.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Pelle Braendgaard", "Blaine Cook", "Larry Halff", "Jesse Clark", "Jon Crosby", "Seth Fitzsimmons"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proletarian-oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pelle Braendgaard