devise-heroku-sso 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14e1cebdc987ee5fdc5742e1f2fafe3214f3bede
4
- data.tar.gz: df573e6732027c7f04b0316315d91c6f2144062b
3
+ metadata.gz: 85e1fe7307f12d5b6ea6ca5eab6f56aaf93108a7
4
+ data.tar.gz: 56a46a969a8b714e8af9f03218a98aa24c36be0b
5
5
  SHA512:
6
- metadata.gz: 0488e34100b26c2f8d5216da67e6f68c9a5ffe7afe5d95d61026e488cb6b17dafb9d3ad99c397096d4236c3e3e5369cade7815af41b605125786ec4b332961a5
7
- data.tar.gz: 48c1e623c94b148ef652d496bad38142bd211fbea3a52abf23046cd0bcc256c9f0ac248de12073d4dbd66dcfc20b55fc62319c46f1108f20d2de80d30230fed3
6
+ metadata.gz: 7a66bc2798d8cec27466b6d5631d10046574721265a86b64d657bb7662d7be5900a074715445bfb912c4d8a8377711a71cbc767eee496ee8dcbc1e2674c4a8b4
7
+ data.tar.gz: 801076e5c9e6fb916ec5ffbbd40009fe7608ddd1f28f0db02ea2f98174f2d44ea6486bf664d7fa3cdccfbe2a656872ea288c72d7f325d1bf2d5c2144f3ce5b76
data/README.md CHANGED
@@ -31,6 +31,10 @@ Example of the routes.rb:
31
31
 
32
32
  This line mounts devise to default sso path which kensa gem uses.
33
33
 
34
+ ## Example rails app with devise-heroku-sso gem
35
+
36
+ Rails template for kensa: https://github.com/Proffard/kensa-create-rails
37
+
34
38
  ## Contributing
35
39
 
36
40
  1. Fork it ( http://github.com/<my-github-username>/devise-heroku-sso/fork )
@@ -3,6 +3,7 @@ require 'devise/strategies/authenticatable'
3
3
  module HerokuSso
4
4
  class CustomStrategy < Devise::Strategies::Authenticatable
5
5
  def valid?
6
+ ::Rails.logger.warn "[HEROKU-SSO] valid: #{valid_token} && #{!token_expired?} "
6
7
  valid_token? && !token_expired?
7
8
  end
8
9
 
@@ -37,6 +38,7 @@ module HerokuSso
37
38
  end
38
39
 
39
40
  def token
41
+ ::Rails.logger.warn "[HEROKU-SSO] #{pre-token} -> #{Digest::SHA1.hexdigest(pre_token).to_s}"
40
42
  Digest::SHA1.hexdigest(pre_token).to_s
41
43
  end
42
44
 
@@ -45,7 +47,7 @@ module HerokuSso
45
47
  end
46
48
 
47
49
  def token_expired?
48
- params[:timestamp].to_i < (Time.now - 2.minutes).to_i
50
+ params[:timestamp].to_i < (Time.now - 5.minutes).to_i
49
51
  end
50
52
  end
51
53
  end
@@ -1,4 +1,4 @@
1
1
  module DeviseHerokuSso
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise-heroku-sso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikolay Samokhin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler