yammer-oauth2 0.3.1 → 0.3.2
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 +4 -3
- data/lib/yammer-oauth2/version.rb +1 -1
- data/spec/client_spec.rb +1 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/yammer-oauth2/client.rb
CHANGED
@@ -8,7 +8,7 @@ module YammerOAuth2
|
|
8
8
|
def initialize(client_id, client_secret, opts={})
|
9
9
|
site_url = opts.delete(:site_url) || DEFAULT_URL
|
10
10
|
super(site_url, client_id, client_secret, opts)
|
11
|
-
@token_path = '/oauth2/
|
11
|
+
@token_path = '/oauth2/access_token'
|
12
12
|
@authorize_path = '/dialogs/oauth'
|
13
13
|
yield self if block_given?
|
14
14
|
self
|
@@ -59,7 +59,7 @@ module YammerOAuth2
|
|
59
59
|
# @opts [Hash] additional parameters to be include in URL eg. scope, state, etc
|
60
60
|
#
|
61
61
|
# >> client = YammerClient.new(config)
|
62
|
-
# >> client.
|
62
|
+
# >> client.webserver_token_url({
|
63
63
|
# :client_secret => @client_secret
|
64
64
|
# :code => 'G3Y6jU3a',
|
65
65
|
# :redirect_uri => 'https://localhost/oauth/cb',
|
@@ -68,7 +68,8 @@ module YammerOAuth2
|
|
68
68
|
# redirect_uri=http%3A%2F%2Flocalhost%2Foauth%2Fcb&client_secret={client_secret}&
|
69
69
|
# grant_type=authorization_code&code=aXW2c6bYz
|
70
70
|
#
|
71
|
-
def
|
71
|
+
def webserver_token_path(code, opts={})
|
72
|
+
opts[:code] = code
|
72
73
|
opts[:scope] = normalize_scope(opts[:scope]) if opts[:scope]
|
73
74
|
opts[:client_secret] = @client_secret
|
74
75
|
authorization_code.token_path(opts)
|
data/spec/client_spec.rb
CHANGED
@@ -56,7 +56,7 @@ describe YammerOAuth2::Client do
|
|
56
56
|
describe "#exchange_auth_code_for_token" do
|
57
57
|
it "makes a request to google oauth2 server" do
|
58
58
|
|
59
|
-
stub_request(:post, "https://www.yammer.com/oauth2/
|
59
|
+
stub_request(:post, "https://www.yammer.com/oauth2/access_token").with(
|
60
60
|
:body => {
|
61
61
|
:grant_type => 'authorization_code',
|
62
62
|
:code => 'MmOGL795LbIZuJJVnL49Cc',
|
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: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kevin Mutyaba
|
metadata.gz.sig
CHANGED
Binary file
|