josso-client 0.1.4 → 0.1.5

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.
@@ -1,10 +1,12 @@
1
- ## YAML Template.
2
1
  development:
3
2
  josso_root: http://www.yourjossoserver.com/josso/
4
3
  partner_application_entry_url: http://localhost:3000
4
+ session_timer: 1800
5
5
  test:
6
6
  josso_root: http://www.yourjossoserver.com/josso/
7
7
  partner_application_entry_url: http://localhost:3000
8
+ session_timer: 1800
8
9
  production:
9
10
  josso_root: http://www.yourjossoserver.com/josso/
10
11
  partner_application_entry_url: http://localhost:3000
12
+ session_timer: 1800
data/lib/josso-client.rb CHANGED
@@ -8,8 +8,8 @@ module Main
8
8
  #
9
9
  # test for override config file
10
10
  #
11
- if File.exist?(RAILS_ROOT + '/config/josso_config.yml')
12
- self.APP_CONFIG = YAML.load_file(RAILS_ROOT + '/config/josso_config.yml')[RAILS_ENV]
11
+ if File.exist?(RAILS_ROOT + '/config/josso_client.yml')
12
+ self.APP_CONFIG = YAML.load_file(RAILS_ROOT + '/config/josso_client.yml')[RAILS_ENV]
13
13
  else
14
14
  self.APP_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), '../config/josso_config.yml'))[RAILS_ENV]
15
15
  end
@@ -85,7 +85,15 @@ module Main
85
85
  # Judge the expiry of the session
86
86
  def is_josso_session_expire(partner_application_entry_url)
87
87
  begin
88
- if(((Time.now.to_i - session[:session_timer_at].to_i) > 1800))
88
+ #
89
+ # no expiration if set to zero
90
+ #
91
+ if self.APP_CONFIG['session_timer'] == 0
92
+ session[:session_timer_at] = Time.now.to_i
93
+ return
94
+ end
95
+
96
+ if(((Time.now.to_i - session[:session_timer_at].to_i) > self.APP_CONFIG['session_timer']))
89
97
  logout()
90
98
  else
91
99
  session[:session_timer_at] = Time.now.to_i
metadata CHANGED
@@ -5,17 +5,16 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Peter Peterson
13
- - Handy Wang
14
13
  autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-10-18 00:00:00 -06:00
17
+ date: 2010-10-20 00:00:00 -06:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -36,7 +35,6 @@ dependencies:
36
35
  description: JOSSO client for Rails.
37
36
  email:
38
37
  - peter@saborgato.com
39
- - nnnwjs@gmail.com
40
38
  executables: []
41
39
 
42
40
  extensions: []
@@ -58,7 +56,7 @@ files:
58
56
  - lib/bak_sso_identity_provider.rb
59
57
  - test/josso_cllient_test.rb
60
58
  - rails/init.rb
61
- - config/josso_config.yml
59
+ - config/josso_client.yml
62
60
  has_rdoc: true
63
61
  homepage: http://engineersatlarge.com
64
62
  licenses: []