authie 4.0.0.rc5 → 4.0.0.rc6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authie/controller_delegate.rb +4 -1
- data/lib/authie/controller_extension.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0ed5ff2724edcadbe4c3da00f495f61c49fb8527a9a3ea990d6cbb0d1b3481
|
4
|
+
data.tar.gz: f3c621bd0cd8561123e39b508647d1bc5b356038928682d1b541635d9913c9cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f326f7e0aee77baccff01544c98730902fd77c722c803b49257bad520eb6f5340ab00bf585050b6a5d447409f86954147ec9e701d9af404948cb8f7977008c78
|
7
|
+
data.tar.gz: 55da617f47e858b869fb4e3f1afb14a45dd3ff2a661656db89906bdf66fd2c2a785ac70163de3e60e342f3e91601fcb058ff7a77663f840502268e77a224d7d5
|
@@ -9,10 +9,13 @@ module Authie
|
|
9
9
|
# The controller delegate implements methods that can be used by a controller. These are then
|
10
10
|
# extended into controllers as needed (see ControllerExtension).
|
11
11
|
class ControllerDelegate
|
12
|
+
attr_accessor :touch_auth_session_enabled
|
13
|
+
|
12
14
|
# @param controller [ActionController::Base]
|
13
15
|
# @return [Authie::ControllerDelegate]
|
14
16
|
def initialize(controller)
|
15
17
|
@controller = controller
|
18
|
+
@touch_auth_session_enabled = true
|
16
19
|
end
|
17
20
|
|
18
21
|
# Sets a browser ID. This must be performed on any page request where AUthie will be used.
|
@@ -52,7 +55,7 @@ module Authie
|
|
52
55
|
def touch_auth_session
|
53
56
|
yield if block_given?
|
54
57
|
ensure
|
55
|
-
auth_session.touch if logged_in?
|
58
|
+
auth_session.touch if @touch_auth_session_enabled && logged_in?
|
56
59
|
end
|
57
60
|
|
58
61
|
# Return the user for the currently logged in user or nil if no user is logged in
|