yammer-oauth2 0.3.1 → 0.3.2

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.
data.tar.gz.sig CHANGED
Binary file
@@ -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/token'
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.webserver_authorization_url({
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 webserver_token_url(opts={})
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)
@@ -2,7 +2,7 @@ module YammerOAuth2
2
2
  class Version
3
3
  MAJOR = 0 unless defined? MAJOR
4
4
  MINOR = 3 unless defined? MINOR
5
- PATCH = 1 unless defined? PATCH
5
+ PATCH = 2 unless defined? PATCH
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].compact.join('.')
@@ -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/token").with(
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: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Mutyaba
metadata.gz.sig CHANGED
Binary file