shopify_app 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shopify_app/login_protection.rb +13 -0
- data/lib/shopify_app/version.rb +1 -1
- metadata +2 -2
@@ -1,4 +1,10 @@
|
|
1
1
|
module ShopifyApp::LoginProtection
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
rescue_from ActiveResource::UnauthorizedAccess, with: :close_session
|
6
|
+
end
|
7
|
+
|
2
8
|
def shopify_session
|
3
9
|
if session[:shopify]
|
4
10
|
begin
|
@@ -17,4 +23,11 @@ module ShopifyApp::LoginProtection
|
|
17
23
|
def shop_session
|
18
24
|
session[:shopify]
|
19
25
|
end
|
26
|
+
|
27
|
+
protected
|
28
|
+
|
29
|
+
def close_session
|
30
|
+
session[:shopify] = nil
|
31
|
+
redirect_to login_path
|
32
|
+
end
|
20
33
|
end
|
data/lib/shopify_app/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
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-07
|
12
|
+
date: 2012-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|