easy_auth 0.3.3 → 0.3.4
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.
- checksums.yaml +4 -4
- data/lib/easy_auth/controllers/authenticated.rb +0 -12
- data/lib/easy_auth/helpers/easy_auth.rb +10 -0
- data/lib/easy_auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 584175a8f8187ad7c3ee1dd9821a7496fbd6fded
|
|
4
|
+
data.tar.gz: a1a716d95186be6d01bd963c904b10489847812d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 186de3f553d0176c8d0cb0c511d3bcfc0d2b48b562998b3edde1c2d3f6f58fa226e522529672ce979715bf60ecd7968428fe8462804534e1a485731843adbab9
|
|
7
|
+
data.tar.gz: db61422a248c40b7bdfb7a259e0ea4bc60b929986930ffbae0286c783be2ca2b6b2794fe149a26863957c441dd5c713314459132efac29e8a2187ddc7773d575
|
|
@@ -4,16 +4,4 @@ module EasyAuth::Controllers::Authenticated
|
|
|
4
4
|
included do
|
|
5
5
|
before_filter :attempt_to_authenticate
|
|
6
6
|
end
|
|
7
|
-
|
|
8
|
-
private
|
|
9
|
-
|
|
10
|
-
def attempt_to_authenticate
|
|
11
|
-
if account_not_signed_in?
|
|
12
|
-
session[:requested_path] = request.method == 'GET' ? request.fullpath : request.referer
|
|
13
|
-
respond_to do |format|
|
|
14
|
-
format.html { redirect_to main_app.sign_in_url }
|
|
15
|
-
format.json { render :json => {}, :status => 401 }
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
7
|
end
|
|
@@ -40,6 +40,16 @@ module EasyAuth::Helpers::EasyAuth
|
|
|
40
40
|
end
|
|
41
41
|
alias :user_not_signed_in? :account_not_signed_in?
|
|
42
42
|
|
|
43
|
+
def attempt_to_authenticate
|
|
44
|
+
if account_not_signed_in?
|
|
45
|
+
session[:requested_path] = request.method == 'GET' ? request.fullpath : request.referer
|
|
46
|
+
respond_to do |format|
|
|
47
|
+
format.html { redirect_to main_app.sign_in_url }
|
|
48
|
+
format.json { render :json => {}, :status => 401 }
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
43
53
|
private
|
|
44
54
|
|
|
45
55
|
def delete_session_data
|
data/lib/easy_auth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Cardarella
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-03-
|
|
12
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|