lobby_boy 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/controllers/lobby_boy/session_controller.rb +1 -1
- data/app/views/lobby_boy/session/check.html.erb +13 -2
- data/lib/lobby_boy/patches/session_management.rb +8 -4
- data/lib/lobby_boy/util/uri.rb +3 -1
- data/lib/lobby_boy/version.rb +1 -1
- metadata +5 -6
- data/lib/tasks/lobby_boy_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f49e5698128828e2cca2f7f63ecf37be40e43abd555a987caa60a7e728df7d2e
|
4
|
+
data.tar.gz: 533baba3a846d3ac37a172d0b83d0b7a7623235000449ccfb0bbfa16b0267981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cc1b772ed716842050b6ea3bc7f40d21a22b6182311df5f780423b531691dee10d6e21fecb113469f9d615232dc0937cb5f6a8335a694bbbaa0a23e12c3201d
|
7
|
+
data.tar.gz: 9113db7479a8cd9e1cb054fd917d276226f923eb050cb25af78c8b5aa34057565e121432c5e2c803ea6d9f9dbbe0addebeafa6dd406dfd862b592fdac21b25d2
|
@@ -23,6 +23,10 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
this.checkSession = function() {
|
26
|
+
if (document.hidden === true) {
|
27
|
+
return; // don't check session if window/tab is inactive
|
28
|
+
}
|
29
|
+
|
26
30
|
var provider = self.getIFrame("openid_connect_provider");
|
27
31
|
|
28
32
|
var message = function(state) {
|
@@ -82,7 +86,8 @@
|
|
82
86
|
};
|
83
87
|
|
84
88
|
this.stopTimer = function() {
|
85
|
-
clearInterval(self.timerID)
|
89
|
+
clearInterval(self.timerID);
|
90
|
+
self.timerID = undefined;
|
86
91
|
};
|
87
92
|
|
88
93
|
this.reauthenticate = function() {
|
@@ -119,7 +124,7 @@
|
|
119
124
|
<% if LobbyBoy.client.on_login_js_partial %>
|
120
125
|
<%= render partial: LobbyBoy.client.on_login_js_partial, formats: [:js] %>
|
121
126
|
<% else %>
|
122
|
-
|
127
|
+
console.log("User has logged in at OP.");
|
123
128
|
<% end %>
|
124
129
|
};
|
125
130
|
|
@@ -165,6 +170,12 @@
|
|
165
170
|
document.addEventListener("DOMContentLoaded", function(event) {
|
166
171
|
setTimeout(self.checkSession, 1000);
|
167
172
|
});
|
173
|
+
|
174
|
+
window.addEventListener('load', function () {
|
175
|
+
window.addEventListener('focus', self.checkSession);
|
176
|
+
window.addEventListener('focus', self.startTimer);
|
177
|
+
window.addEventListener('blur', self.stopTimer);
|
178
|
+
});
|
168
179
|
<% end %>
|
169
180
|
|
170
181
|
self.startTimer();
|
@@ -7,14 +7,18 @@ module SessionManagement
|
|
7
7
|
# Always append 'prompt=none' to every authorization request to make the login
|
8
8
|
# automatic if possible.
|
9
9
|
def authorize_uri
|
10
|
-
LobbyBoy
|
11
|
-
|
12
|
-
|
10
|
+
return super unless LobbyBoy.configured?
|
11
|
+
|
12
|
+
LobbyBoy::Util::URI.add_query_params(
|
13
|
+
super,
|
14
|
+
prompt: request.params['prompt'] || options.prompt || 'none',
|
15
|
+
id_token_hint: request.params['id_token_hint']
|
16
|
+
)
|
13
17
|
end
|
14
18
|
|
15
19
|
def access_token
|
16
20
|
return super unless LobbyBoy.configured?
|
17
|
-
|
21
|
+
|
18
22
|
at = super
|
19
23
|
|
20
24
|
@id_token ||= begin
|
data/lib/lobby_boy/util/uri.rb
CHANGED
data/lib/lobby_boy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lobby_boy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Finn GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.2.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.2.1
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- info@finn.de
|
@@ -76,7 +76,6 @@ files:
|
|
76
76
|
- lib/lobby_boy/patches/session_management.rb
|
77
77
|
- lib/lobby_boy/util/uri.rb
|
78
78
|
- lib/lobby_boy/version.rb
|
79
|
-
- lib/tasks/lobby_boy_tasks.rake
|
80
79
|
homepage: https://github.com/finnlabs/lobby_boy
|
81
80
|
licenses:
|
82
81
|
- GPLv3
|
@@ -97,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
96
|
version: '0'
|
98
97
|
requirements: []
|
99
98
|
rubyforge_project:
|
100
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.7.6
|
101
100
|
signing_key:
|
102
101
|
specification_version: 4
|
103
102
|
summary: Rails engine for OpenIDConnect Session Management
|