bsm-sso-client 0.7.7 → 0.7.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ class Bsm::Sso::Client::FailureApp < ActionController::Metal
13
13
  end
14
14
 
15
15
  def respond
16
- if Bsm::Sso::Client.navigational_formats.include?(request.format.try(:to_sym))
16
+ if Bsm::Sso::Client.navigational_formats.include?(request.format.try(:to_sym)) || request.accepts.include?(Mime::HTML)
17
17
  request.xhr? ? respond_with_js! : redirect!
18
18
  else
19
19
  stop!
@@ -21,7 +21,8 @@ class Bsm::Sso::Client::FailureApp < ActionController::Metal
21
21
  end
22
22
 
23
23
  def redirect!
24
- redirect_to Bsm::Sso::Client.user_class.sso_sign_in_url(:service => service_url(env["warden.options"][:attempted_path])), :status => 303
24
+ path = env["warden.options"].try(:[], :attempted_path) || request.fullpath
25
+ redirect_to Bsm::Sso::Client.user_class.sso_sign_in_url(:service => service_url(path)), :status => 303
25
26
  end
26
27
 
27
28
  def respond_with_js!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bsm-sso-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-06 00:00:00.000000000 Z
12
+ date: 2012-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties