omniauth-canvas 0.1.3 → 1.0.0
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
- data/lib/omniauth-canvas/version.rb +1 -1
- data/lib/omniauth/strategies/canvas.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c0c30e36d3e9b1c579d216e667b02ad46187a61
|
4
|
+
data.tar.gz: 5b6138bd38ebb022175315f85f5f9a5ad89d73ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64f34e7d984274d65b291797ac430354c84a21e68112cf7a599efb0b8b1653dfab73f86a95641c7ae4e9c8e81e22efee15c8391accffb63c4819498c6c669fc4
|
7
|
+
data.tar.gz: 1fb3d8d74b34dc7053bb957bade9d1559971674261e8a6222643593e30275ac5f5841a39e8aa3af8c1f2c17f6dd332b142b61067cb8607765d13344df771592e
|
@@ -39,9 +39,25 @@ module OmniAuth
|
|
39
39
|
@raw_info ||= access_token.get("/api/v1/users/#{access_token['user']['id']}/profile").parsed
|
40
40
|
end
|
41
41
|
|
42
|
+
# Passing any query string value to Canvas will result in:
|
43
|
+
# redirect_uri does not match client settings
|
44
|
+
# so we set the value to empty string
|
42
45
|
def query_string
|
43
46
|
""
|
44
47
|
end
|
48
|
+
|
49
|
+
# Override authorize_params so that we can be deliberate about setting state if needed
|
50
|
+
def authorize_params
|
51
|
+
# Only set state if it hasn't already been set
|
52
|
+
options.authorize_params[:state] ||= SecureRandom.hex(24)
|
53
|
+
params = options.authorize_params.merge(options_for("authorize"))
|
54
|
+
if OmniAuth.config.test_mode
|
55
|
+
@env ||= {}
|
56
|
+
@env["rack.session"] ||= {}
|
57
|
+
end
|
58
|
+
session["omniauth.state"] = params[:state]
|
59
|
+
params
|
60
|
+
end
|
45
61
|
end
|
46
62
|
end
|
47
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-canvas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|