omniauth 2.1.3 → 2.1.4
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/.github/workflows/main.yml +1 -1
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/lib/omniauth/builder.rb +4 -0
- data/lib/omniauth/strategy.rb +8 -2
- data/lib/omniauth/version.rb +1 -1
- data/lib/omniauth.rb +10 -1
- data/omniauth.gemspec +1 -0
- metadata +17 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6adedf2d934dc7dd0ced2227b34493689ea641352aa48b4951a7bd7eb315ed12
|
4
|
+
data.tar.gz: b34447ed4ba1ed3ab8fc22d6a23bf97157fc5a463ede72189af1ac80a39f4328
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 055d23e2630406e528178af7f933662c832c8427df39c8dacc5d7a59a6379657792b29fbdcaf80a6259c65f3d96331c3f2caf0d9710e4bd331bb4355c0e40692
|
7
|
+
data.tar.gz: d64fa86620a4f17dfe2a7735ff9600020aa6be03650fdc6b321f470a8c21ee0069ce4735888ee72e55d2b63b45466db1b4c108e8bd7f1969d777eedbc38139ef
|
data/.github/workflows/main.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
[coveralls]: https://coveralls.io/r/omniauth/omniauth
|
16
16
|
|
17
17
|
This is the documentation for the in-development branch of OmniAuth.
|
18
|
-
You can find the documentation for the latest stable release [here](https://github.com/omniauth/omniauth/tree/v2.1.
|
18
|
+
You can find the documentation for the latest stable release [here](https://github.com/omniauth/omniauth/tree/v2.1.4)
|
19
19
|
|
20
20
|
## An Introduction
|
21
21
|
OmniAuth is a library that standardizes multi-provider authentication for
|
data/lib/omniauth/builder.rb
CHANGED
@@ -12,6 +12,10 @@ module OmniAuth
|
|
12
12
|
OmniAuth.config.before_request_phase = block
|
13
13
|
end
|
14
14
|
|
15
|
+
def after_request_phase(&block)
|
16
|
+
OmniAuth.config.after_request_phase = block
|
17
|
+
end
|
18
|
+
|
15
19
|
def before_callback_phase(&block)
|
16
20
|
OmniAuth.config.before_callback_phase = block
|
17
21
|
end
|
data/lib/omniauth/strategy.rb
CHANGED
@@ -240,7 +240,7 @@ module OmniAuth
|
|
240
240
|
OmniAuth.config.request_validation_phase.call(env) if OmniAuth.config.request_validation_phase
|
241
241
|
OmniAuth.config.before_request_phase.call(env) if OmniAuth.config.before_request_phase
|
242
242
|
|
243
|
-
if options.form.respond_to?(:call)
|
243
|
+
result = if options.form.respond_to?(:call)
|
244
244
|
log :debug, 'Rendering form from supplied Rack endpoint.'
|
245
245
|
options.form.call(env)
|
246
246
|
elsif options.form
|
@@ -257,6 +257,9 @@ module OmniAuth
|
|
257
257
|
|
258
258
|
request_phase
|
259
259
|
end
|
260
|
+
|
261
|
+
OmniAuth.config.after_request_phase.call(env) if OmniAuth.config.after_request_phase
|
262
|
+
result
|
260
263
|
rescue OmniAuth::AuthenticityError => e
|
261
264
|
fail!(:authenticity_error, e)
|
262
265
|
end
|
@@ -330,7 +333,10 @@ module OmniAuth
|
|
330
333
|
end
|
331
334
|
end
|
332
335
|
|
333
|
-
redirect(callback_url)
|
336
|
+
result = redirect(callback_url)
|
337
|
+
|
338
|
+
OmniAuth.config.after_request_phase.call(env) if OmniAuth.config.after_request_phase
|
339
|
+
result
|
334
340
|
end
|
335
341
|
|
336
342
|
def mock_callback_call
|
data/lib/omniauth/version.rb
CHANGED
data/lib/omniauth.rb
CHANGED
@@ -42,6 +42,7 @@ module OmniAuth
|
|
42
42
|
:failure_raise_out_environments => ['development'],
|
43
43
|
:request_validation_phase => OmniAuth::AuthenticityTokenProtection,
|
44
44
|
:before_request_phase => nil,
|
45
|
+
:after_request_phase => nil,
|
45
46
|
:before_callback_phase => nil,
|
46
47
|
:before_options_phase => nil,
|
47
48
|
:form_css => Form::DEFAULT_CSS,
|
@@ -97,6 +98,14 @@ module OmniAuth
|
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
101
|
+
def after_request_phase(&block)
|
102
|
+
if block_given?
|
103
|
+
@after_request_phase = block
|
104
|
+
else
|
105
|
+
@after_request_phase
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
100
109
|
def add_mock(provider, original = {})
|
101
110
|
# Create key-stringified new hash from given auth hash
|
102
111
|
mock = {}
|
@@ -126,7 +135,7 @@ module OmniAuth
|
|
126
135
|
camelizations[name.to_s] = camelized.to_s
|
127
136
|
end
|
128
137
|
|
129
|
-
attr_writer :on_failure, :before_callback_phase, :before_options_phase, :before_request_phase, :request_validation_phase
|
138
|
+
attr_writer :on_failure, :before_callback_phase, :before_options_phase, :before_request_phase, :after_request_phase, :request_validation_phase
|
130
139
|
attr_accessor :failure_raise_out_environments, :path_prefix, :allowed_request_methods, :form_css,
|
131
140
|
:test_mode, :mock_auth, :full_host, :camelizations, :logger, :silence_get_warning
|
132
141
|
end
|
data/omniauth.gemspec
CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.add_dependency 'rack', '>= 2.2.3'
|
10
10
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
11
11
|
spec.add_dependency 'rack-protection'
|
12
|
+
spec.add_dependency 'logger'
|
12
13
|
spec.add_development_dependency 'rake', '~> 12.0'
|
13
14
|
spec.authors = ['Michael Bleigh', 'Erik Michaels-Ober', 'Tom Milewski']
|
14
15
|
spec.description = 'A generalized Rack framework for multiple-provider authentication.'
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bleigh
|
8
8
|
- Erik Michaels-Ober
|
9
9
|
- Tom Milewski
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: hashie
|
@@ -68,6 +67,20 @@ dependencies:
|
|
68
67
|
- - ">="
|
69
68
|
- !ruby/object:Gem::Version
|
70
69
|
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: logger
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
71
84
|
- !ruby/object:Gem::Dependency
|
72
85
|
name: rake
|
73
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,7 +139,6 @@ homepage: https://github.com/omniauth/omniauth
|
|
126
139
|
licenses:
|
127
140
|
- MIT
|
128
141
|
metadata: {}
|
129
|
-
post_install_message:
|
130
142
|
rdoc_options: []
|
131
143
|
require_paths:
|
132
144
|
- lib
|
@@ -141,8 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
153
|
- !ruby/object:Gem::Version
|
142
154
|
version: 1.3.5
|
143
155
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
145
|
-
signing_key:
|
156
|
+
rubygems_version: 3.6.9
|
146
157
|
specification_version: 4
|
147
158
|
summary: A generalized Rack framework for multiple-provider authentication.
|
148
159
|
test_files: []
|