plangrade-ruby 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e652a8d54a1a88711cd41b3255911dd5b039b8c8
4
- data.tar.gz: 89b34004cc1442b93a91374cbc0aaffc775ce5d5
3
+ metadata.gz: 60188d69c90a2431575a09b721a9c8e892339615
4
+ data.tar.gz: 221d0fda2ecdf0de217a9b1ac15f2ff5c492cd71
5
5
  SHA512:
6
- metadata.gz: 799bb552f367172e05b91b557c2d54a2229462674183f0a6593812d9a7622677f74f731a9c0badafc675998c1fd5519d9a43da6d439bb44d5d8946d37e96e241
7
- data.tar.gz: fff37b6143cba4670901e14d1be4e58ce67561af1df97ee8cab3a902605d8156369f335ee28156b38b6f8cc60c2d58f115f1f5ce5e0acb8165e5de12bb4750ca
6
+ metadata.gz: 12cea6335c3d6959eaeb13a6f3638f695c2cf4be81969dee485f5ef77d62f26ff6ed199904ac91d22c9bb3bb436616ce3f1e98ac6cd0dad5f0004211b0eb85a7
7
+ data.tar.gz: 817f3405e7c151e4d8c27b94121ec6dc0f12a4e2f990da1571d2bc04872203de1923b07b6df96d4bd150c20d83c6e381165240522c97060795ea0949d771c5bf
checksums.yaml.gz.sig CHANGED
Binary file
@@ -65,7 +65,7 @@ module Plangrade
65
65
  # :redirect_uri => 'http://localhost:3000/auth/plangrade/callback',
66
66
  # })
67
67
  #
68
- # POST /oauth2/access_token HTTP/1.1
68
+ # POST /oauth/token HTTP/1.1
69
69
  # Host: www.plangrade.com
70
70
  # Content-Type: application/x-www-form-urlencoded
71
71
 
@@ -75,5 +75,29 @@ module Plangrade
75
75
  opts[:authenticate] ||= :body
76
76
  authorization_code.get_token(code, opts)
77
77
  end
78
+
79
+ # Makes a request to Plangrade server that will swap your refresh token for an access
80
+ # token and new refresh token
81
+ #
82
+ # @see http://docs.plangrade.com/#refresh-authorization
83
+ #
84
+ # @opts [Hash] may include scope and other parameters
85
+ #
86
+ # >> client = PlangradeClient.new(config)
87
+ # >> client.refresh!('G3Y6jU3a', {
88
+ # :scope => 'abc, xyz',
89
+ # })
90
+ #
91
+ # POST /oauth/token HTTP/1.1
92
+ # Host: www.plangrade.com
93
+ # Content-Type: application/x-www-form-urlencoded
94
+
95
+ # client_id={client_id}&refresh_token=G3Y6jU3a&grant_type=refresh_token&
96
+ # client_secret={client_secret}
97
+ def refresh!(ref_token, opts={})
98
+ opts[:authenticate] ||= :body
99
+ token = refresh_token.get_token(ref_token, opts)
100
+ return token
101
+ end
78
102
  end
79
103
  end
@@ -1,5 +1,5 @@
1
1
  module Plangrade
2
2
  module Ruby
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plangrade-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Reynoso
metadata.gz.sig CHANGED
Binary file