thincloud-authentication 0.1.4 → 0.2.1

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.
@@ -33,7 +33,7 @@ module Thincloud::Authentication
33
33
  RegistrationsMailer.verification_token(@identity).deliver
34
34
  flash[:notice] = "Check your email to verify your registration."
35
35
  end
36
- redirect_to main_app.root_url
36
+ redirect_to after_registration_path
37
37
  end
38
38
  end
39
39
 
@@ -6,13 +6,13 @@ module Thincloud::Authentication
6
6
  before_filter :authenticate!, only: [:authenticated]
7
7
 
8
8
  def new
9
- redirect_to main_app.root_url if logged_in?
9
+ redirect_to after_login_path if logged_in?
10
10
  @identity = Identity.new
11
11
  end
12
12
 
13
13
  def destroy
14
14
  logout
15
- redirect_to main_app.root_url, notice: "You have been logged out."
15
+ redirect_to after_logout_path, notice: "You have been logged out."
16
16
  end
17
17
 
18
18
  def authenticated
@@ -58,6 +58,27 @@ module Thincloud
58
58
  reset_session
59
59
  end
60
60
 
61
+ # Protected: Provides the URL to redirect to after logging in.
62
+ #
63
+ # Returns: A string.
64
+ def after_login_path
65
+ main_app.root_url
66
+ end
67
+
68
+ # Protected: Provides the URL to redirect to after logging out.
69
+ #
70
+ # Returns: A string.
71
+ def after_logout_path
72
+ main_app.root_url
73
+ end
74
+
75
+ # Protected: Provides the URL to redirect to after registering.
76
+ #
77
+ # Returns: A string.
78
+ def after_registration_path
79
+ main_app.root_url
80
+ end
81
+
61
82
  end
62
83
 
63
84
  end
@@ -1,5 +1,5 @@
1
1
  module Thincloud
2
2
  module Authentication
3
- VERSION = "0.1.4"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thincloud-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -268,7 +268,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  segments:
270
270
  - 0
271
- hash: 3656149340938148571
271
+ hash: 697516797273733022
272
272
  required_rubygems_version: !ruby/object:Gem::Requirement
273
273
  none: false
274
274
  requirements:
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  version: '0'
278
278
  segments:
279
279
  - 0
280
- hash: 3656149340938148571
280
+ hash: 697516797273733022
281
281
  requirements: []
282
282
  rubyforge_project:
283
283
  rubygems_version: 1.8.24