devise_ichain_authenticatable 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,7 @@ class Devise::IchainRegistrationsController < DeviseController
8
8
  set_flash_message :alert, :in_test_mode
9
9
  redirect_to redirect_url
10
10
  else
11
- # The last slash is very important, indeed
12
- sign_up_url = ::Devise.ichain_base_url + "/ICSLogin/"
11
+ sign_up_url = resource_class.ichain_registration_url
13
12
  sign_up_url += "?" + {:url => redirect_url}.to_query
14
13
  redirect_to sign_up_url
15
14
  end
@@ -7,7 +7,7 @@ class Devise::IchainSessionsController < DeviseController
7
7
  self.resource = build_resource(nil, :unsafe => true)
8
8
  @back_url = base_url + after_sign_in_path_for(resource_name)
9
9
  # The slash at the end is very important
10
- @login_url = (::Devise.ichain_base_url || "") + "/ICSLogin/auth-up/"
10
+ @login_url = resource_class.ichain_login_url
11
11
  @context = ::Devise.ichain_context
12
12
  @proxypath = ::Devise.ichain_proxypath
13
13
  respond_with resource
@@ -24,7 +24,7 @@ class Devise::IchainSessionsController < DeviseController
24
24
  redirect_to redirect_url
25
25
  else
26
26
  # The final slash is very important, indeed
27
- logout_url = ::Devise.ichain_base_url + "/ICHAINLogout/"
27
+ logout_url = resource_class.ichain_logout_url
28
28
  logout_url += "?" + {:url => redirect_url}.to_query
29
29
  redirect_to logout_url
30
30
  end
@@ -6,6 +6,19 @@ module Devise
6
6
  end
7
7
 
8
8
  module ClassMethods
9
+ # The slashes at the end of the urls looks to be relevant
10
+
11
+ def ichain_registration_url
12
+ (::Devise.ichain_base_url || "") + "/ICSLogin/"
13
+ end
14
+
15
+ def ichain_login_url
16
+ (::Devise.ichain_base_url || "") + "/ICSLogin/auth-up/"
17
+ end
18
+
19
+ def ichain_logout_url
20
+ (::Devise.ichain_base_url || "") + "/ICHAINLogout/"
21
+ end
9
22
  end
10
23
 
11
24
  def signed_in_by_ichain!
@@ -1,3 +1,3 @@
1
1
  module DeviseIchainAuthenticatable
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "0.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_ichain_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Ancor González Sosa
@@ -13,15 +14,17 @@ dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: devise
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '2.2'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '2.2'
27
30
  description: Devise extension to allow authentication via iChain
@@ -51,25 +54,27 @@ files:
51
54
  homepage: https://github.com/openSUSE/devise_ichain_authenticatable
52
55
  licenses:
53
56
  - MIT
54
- metadata: {}
55
57
  post_install_message:
56
58
  rdoc_options: []
57
59
  require_paths:
58
60
  - lib
59
61
  required_ruby_version: !ruby/object:Gem::Requirement
62
+ none: false
60
63
  requirements:
61
- - - '>='
64
+ - - ! '>='
62
65
  - !ruby/object:Gem::Version
63
66
  version: '0'
64
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
+ none: false
65
69
  requirements:
66
- - - '>='
70
+ - - ! '>='
67
71
  - !ruby/object:Gem::Version
68
72
  version: '0'
69
73
  requirements: []
70
74
  rubyforge_project:
71
- rubygems_version: 2.0.2
75
+ rubygems_version: 1.8.25
72
76
  signing_key:
73
- specification_version: 4
77
+ specification_version: 3
74
78
  summary: Devise extension to allow authentication via iChain
75
79
  test_files: []
80
+ has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 093af6e9bb565331c98533fc34f5e3907df06fe1
4
- data.tar.gz: b41b54ff363932179dfd879c4e2f4d8b352a57f1
5
- SHA512:
6
- metadata.gz: a8a0de06007e8b7bf7bd4e02c4b5dac17430eb6c7367862bb99eba60118120903357d26d59f2b2337e1fd60a72b550d0a2816a91c6a1d0eb46b9bbdc31608015
7
- data.tar.gz: 34c6762a31609d8ef91ebf2b22517596372dbd88b192ee1f247c17fccc56418bca7ff47aac4bdfc05cc6374db7b5e259aac25459e43c79e6c0e0ad20865fd597