warden-github 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/warden-github/proxy.rb +6 -5
- data/lib/warden-github/strategy.rb +1 -0
- data/lib/warden-github/user.rb +4 -0
- data/lib/warden-github/version.rb +1 -1
- metadata +4 -4
data/lib/warden-github/proxy.rb
CHANGED
@@ -2,8 +2,9 @@ module Warden
|
|
2
2
|
module Github
|
3
3
|
module Oauth
|
4
4
|
class Proxy
|
5
|
-
|
6
|
-
|
5
|
+
attr_accessor :client_id, :secret, :scopes, :callback_url
|
6
|
+
def initialize(client_id, secret, scopes, callback_url)
|
7
|
+
@client_id, @secret, @scopes, @callback_url = client_id, secret, scopes, callback_url
|
7
8
|
end
|
8
9
|
|
9
10
|
def client
|
@@ -14,13 +15,13 @@ module Warden
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def access_token_for(code)
|
17
|
-
web_server.get_access_token(code, :redirect_uri =>
|
18
|
+
web_server.get_access_token(code, :redirect_uri => callback_url)
|
18
19
|
end
|
19
20
|
|
20
21
|
def authorize_url
|
21
22
|
web_server.authorize_url(
|
22
|
-
:scope =>
|
23
|
-
:redirect_uri =>
|
23
|
+
:scope => scopes,
|
24
|
+
:redirect_uri => callback_url
|
24
25
|
)
|
25
26
|
end
|
26
27
|
|
data/lib/warden-github/user.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warden-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Donohoe
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-17 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|