plangrade-ruby 0.0.8 → 0.0.9
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/plangrade/oauth2_client.rb +25 -1
- data/lib/plangrade/ruby/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60188d69c90a2431575a09b721a9c8e892339615
|
|
4
|
+
data.tar.gz: 221d0fda2ecdf0de217a9b1ac15f2ff5c492cd71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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 /
|
|
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
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|