omniauth-pandadoc 1.0.0rc2 → 1.0.0rc3
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eed4e219f8e70d1982f043aab2b31f9939fc0e426a55461d545503559019b05
|
4
|
+
data.tar.gz: 6b29e9cc520aa91faf49d07e8c4a4871fb2f81c1f2872bd0edacc940f7765197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e16930dc7153e6f296a76ebb8ed08531efa36d0192d89167a832dd2da54e39e1c5840cd0779f6ef60552c3a4508fe9ea657eb3c02a0a740050d32bfb90607c11
|
7
|
+
data.tar.gz: 56d85c860d219502923ce61d75aabced3612cbbeb711e472e1317376220076637a904d177863f933bfd62e82b2ee2c10036d3fd29ed872af106716c650d11b36
|
@@ -5,7 +5,7 @@ module OmniAuth
|
|
5
5
|
module Strategies
|
6
6
|
# Main class for Pandadoc OAuth2 strategy.
|
7
7
|
class Pandadoc < OmniAuth::Strategies::OAuth2
|
8
|
-
DEFAULT_SCOPE = 'read+write'
|
8
|
+
DEFAULT_SCOPE = 'read+write'.freeze
|
9
9
|
|
10
10
|
option :client_options,
|
11
11
|
site: 'https://api.pandadoc.com/public/v1',
|
@@ -14,8 +14,10 @@ module OmniAuth
|
|
14
14
|
|
15
15
|
option :provider_ignores_state, true # this is needed for local testing
|
16
16
|
|
17
|
-
def
|
18
|
-
|
17
|
+
def authorize_params
|
18
|
+
super.tap do |params|
|
19
|
+
params[:scope] ||= DEFAULT_SCOPE
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
@@ -105,4 +105,18 @@ describe OmniAuth::Strategies::Pandadoc do
|
|
105
105
|
expect(subject.callback_path).to eq('/auth/foo/callback')
|
106
106
|
end
|
107
107
|
end
|
108
|
+
|
109
|
+
describe '#authorize_params' do
|
110
|
+
it 'takes a custom scope' do
|
111
|
+
@options = { scope: 'foo' }
|
112
|
+
|
113
|
+
expect(subject.authorize_params[:scope]).to eq 'foo'
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'provides a default scope if none is provided' do
|
117
|
+
@options = {}
|
118
|
+
|
119
|
+
expect(subject.authorize_params[:scope]).to eq described_class::DEFAULT_SCOPE
|
120
|
+
end
|
121
|
+
end
|
108
122
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-pandadoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.0rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Carey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jwt
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: 1.3.1
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.7.
|
140
|
+
rubygems_version: 2.7.7
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Pandadoc Strategy for OmniAuth
|