devise_g5_authenticatable 1.0.2.rc.1 → 1.0.2.rc.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c067c7d918fd55154bae4b5e4e806d7b1f5d0b2c04b577874af118493c110814
|
|
4
|
+
data.tar.gz: 0d8c7dc8a43e3a89df88f62fd431d575ba4797ad9cbc9dcda30598f870724bd7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ff77d6f4d550e2d6ffe66f5d2d3a5931b3ecd94bd4118bb58c14073291641998ad72a7475c34ea2bb62145e08ad9449b1d7fb6827e3081a43f3e93b45158cbd
|
|
7
|
+
data.tar.gz: e3b67044ef47951292f8158f38ecfd31587164ab0c8e13cc2e6dba42ced0e1205b2cb5d0af549532bfcc3e7c2474c7097003c45fd8c9169eecccd69109a51306
|
data/Gemfile
CHANGED
|
@@ -17,7 +17,8 @@ module DeviseG5Authenticatable
|
|
|
17
17
|
if authorized?
|
|
18
18
|
sign_in_or_register
|
|
19
19
|
else
|
|
20
|
-
|
|
20
|
+
params = { restricted: base_url }
|
|
21
|
+
redirect_to(restricted_application_redirect_url + params.to_query)
|
|
21
22
|
end
|
|
22
23
|
end
|
|
23
24
|
|
|
@@ -30,7 +31,11 @@ module DeviseG5Authenticatable
|
|
|
30
31
|
protected
|
|
31
32
|
|
|
32
33
|
def authorized?
|
|
33
|
-
accessible_applications.map(&:url).include?(
|
|
34
|
+
accessible_applications.map(&:url).include?(base_url) || accessible_applications.map(&:url).include?('global')
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def base_url
|
|
38
|
+
request.base_url
|
|
34
39
|
end
|
|
35
40
|
|
|
36
41
|
def accessible_applications
|
|
@@ -66,7 +71,7 @@ module DeviseG5Authenticatable
|
|
|
66
71
|
end
|
|
67
72
|
|
|
68
73
|
def remote_sign_out
|
|
69
|
-
redirect_url = URI.join(
|
|
74
|
+
redirect_url = URI.join(base_url,
|
|
70
75
|
after_sign_out_path_for(resource_name))
|
|
71
76
|
redirect_to auth_client.sign_out_url(redirect_url.to_s)
|
|
72
77
|
end
|
|
@@ -193,7 +193,8 @@ RSpec.describe DeviseG5Authenticatable::SessionsController do
|
|
|
193
193
|
|
|
194
194
|
it 'should redirect the user to the restricted_application_redirect_url' do
|
|
195
195
|
create_session
|
|
196
|
-
|
|
196
|
+
params = { restricted: subject.request.base_url }
|
|
197
|
+
expect(subject).to redirect_to(auth_hash.extra.raw_info.restricted_application_redirect_url + params.to_query)
|
|
197
198
|
end
|
|
198
199
|
|
|
199
200
|
it 'should not sign in a user' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devise_g5_authenticatable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.2.rc.
|
|
4
|
+
version: 1.0.2.rc.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Maeve Revels
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: devise
|