signpost-rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/signpost/rails/authentication.rb +8 -2
- data/lib/signpost/rails/version.rb +1 -1
- 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: 37a9764389ded59d5da97d83eeec31e214f6df7a
|
4
|
+
data.tar.gz: 2750dfa4d4e1bcd65610ce3ed50357963bec9aef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a36a4adaa7341c7baf480b21e590d4a832b3a9c9eceb13e7ed861a0ab419abd1c354082b052d2c35ca594ee54edf7263209508fd30339950a05e1cb653776f5
|
7
|
+
data.tar.gz: de26778b870a07cffeb59e9be8b3619899d4b5d585d9b3dc73f255e86b5472c34fb0d06401a15b1c2686ae293f8386186df108b937a16a355ac70f8413ae7967
|
@@ -21,9 +21,15 @@ module SignPost
|
|
21
21
|
|
22
22
|
def authorized_keys
|
23
23
|
# If cached for less than 5 mins, then return the cache
|
24
|
-
|
24
|
+
::Rails.logger.log "Users: #{signpost_users}"
|
25
|
+
|
26
|
+
if signpost_users && (Time.now - signpost_users[:cached_at]) < 5 * 60
|
27
|
+
::Rails.logger.log "Passing cached entry for authorized keys"
|
28
|
+
return signpost_users[:authorized_keys_path]
|
29
|
+
end
|
25
30
|
keys = SignPost::Rails::Authentication.fetch_method.call
|
26
|
-
self.signpost_users = { cached_at: Time.now,
|
31
|
+
self.signpost_users = { cached_at: Time.now, authorized_keys_path: keys }
|
32
|
+
signpost_users[:authorized_keys_path]
|
27
33
|
end
|
28
34
|
end
|
29
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signpost-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Nadeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: signpost-verifier
|