yammer-oauth2 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/lib/yammer-oauth2/client.rb +3 -5
- data/lib/yammer-oauth2/version.rb +1 -1
- data/spec/client_spec.rb +2 -4
- metadata +3 -3
- metadata.gz.sig +4 -1
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/yammer-oauth2/client.rb
CHANGED
@@ -94,12 +94,10 @@ module YammerOAuth2
|
|
94
94
|
# client_id={client_id}&code=G3Y6jU3a&grant_type=authorization_code&
|
95
95
|
# redirect_uri=http%3A%2F%2Flocalhost%2Foauth%2Fcb&client_secret={client_secret}
|
96
96
|
|
97
|
-
def exchange_auth_code_for_token(opts={})
|
98
|
-
unless (opts[:params] && opts[:params][:code])
|
99
|
-
raise ArgumentError.new("You must include an authorization code as a parameter")
|
100
|
-
end
|
97
|
+
def exchange_auth_code_for_token(code, opts={})
|
101
98
|
opts[:authenticate] ||= :body
|
102
|
-
|
99
|
+
opts[:params] = {}
|
100
|
+
opts[:params][:redirect_uri] = opts.delete(:redirect_uri)
|
103
101
|
authorization_code.get_token(code, opts)
|
104
102
|
end
|
105
103
|
end
|
data/spec/client_spec.rb
CHANGED
@@ -71,10 +71,8 @@ describe YammerOAuth2::Client do
|
|
71
71
|
}
|
72
72
|
)
|
73
73
|
response = subject.exchange_auth_code_for_token(
|
74
|
-
|
75
|
-
|
76
|
-
:redirect_uri => 'https://localhost'
|
77
|
-
}
|
74
|
+
'MmOGL795LbIZuJJVnL49Cc',
|
75
|
+
:redirect_uri => 'https://localhost'
|
78
76
|
)
|
79
77
|
end
|
80
78
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yammer-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kevin Mutyaba
|
metadata.gz.sig
CHANGED
@@ -1 +1,4 @@
|
|
1
|
-
|
1
|
+
`!ÍR�;s��j"��D���k��_�o;[�����C_%u�ܔf��(��(.����Y���Z�-��,*6/
|
2
|
+
U�LJG�
|
3
|
+
m_b�rb�6����G�ێ�
|
4
|
+
�F����\���r�w�b�1�:�krҹT}
|