omniauth-bike-index 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/lib/omniauth/bike_index/version.rb +1 -1
- data/lib/omniauth/strategies/bike_index.rb +11 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01d745f15c082b6b8906b5643f130d20f39bbc66b7425b563a2b12b3f85f17d1
|
4
|
+
data.tar.gz: 39c97a47c2950793af76588ad1697b49ae653fdd08714198162a7f97b4e8f6a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dfcab4f77621d617a78870bd923379fdc2f311b33dab85549f8fc8df08668876d1d9d78671fbc4f2aeb4a42b52774e0826788a54acbca66b08630ea1d165b37
|
7
|
+
data.tar.gz: 4b53ab68270c7c2634bafecedc156314cc1023036e44e83a94b578f49a87eda4393ca15464983bd6490b251665a8d6128023fcc0be2324963ebb583a6ffc1608
|
data/.gitignore
CHANGED
@@ -31,11 +31,20 @@ module OmniAuth
|
|
31
31
|
@raw_info ||= access_token.get("/api/v3/me").parsed || {}
|
32
32
|
end
|
33
33
|
|
34
|
+
def param_or_option(key)
|
35
|
+
# omniauth.params are the parameters passed in to the URL
|
36
|
+
# (e.g. company in /users/auth/bike_index?company=Metro)
|
37
|
+
# So for partner, company and unauthenticated_redirect it tries those params, then goes from settings
|
38
|
+
session["omniauth.params"] && session["omniauth.params"][key] ||
|
39
|
+
option[key]
|
40
|
+
end
|
41
|
+
|
34
42
|
def request_phase
|
35
43
|
options[:authorize_params] = {
|
36
44
|
scope: (options["scope"] || DEFAULT_SCOPE),
|
37
|
-
partner:
|
38
|
-
|
45
|
+
partner: param_or_option("partner"),
|
46
|
+
company: param_or_option("company"),
|
47
|
+
unauthenticated_redirect: param_or_option("unauthenticated_redirect")
|
39
48
|
}
|
40
49
|
super
|
41
50
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-bike-index
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Herr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|
@@ -104,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
|
108
|
-
rubygems_version: 2.7.6.2
|
107
|
+
rubygems_version: 3.0.3
|
109
108
|
signing_key:
|
110
109
|
specification_version: 4
|
111
110
|
summary: Bike Index strategy for OmniAuth
|