thincloud-authentication 0.1.4 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -6,13 +6,13 @@ module Thincloud::Authentication
|
|
6
6
|
before_filter :authenticate!, only: [:authenticated]
|
7
7
|
|
8
8
|
def new
|
9
|
-
redirect_to
|
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
|
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
|
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
|
+
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:
|
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:
|
280
|
+
hash: 697516797273733022
|
281
281
|
requirements: []
|
282
282
|
rubyforge_project:
|
283
283
|
rubygems_version: 1.8.24
|