rails_sso 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails_sso/helpers.rb +4 -4
- data/lib/rails_sso/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4d48903a72cbc4b17e174fc2c9d9086d62e5787
|
4
|
+
data.tar.gz: cd2858884d2731c62463f479d632d69732f745ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 635bfda00322076a73614662f89e7b5a40f557988ba1bddbe8de47cab90ac22f3b929ed36e6c991e6848f7466be6e871ab13b7e76aa309e6c251c4a0fb62f18b
|
7
|
+
data.tar.gz: c2c3973789ff1a34cabadf07c3edf2778e0fc45560e4ec7f7fb8a8b5f4a8d3e22d478acf23b61f20531c8eefa787baa9e0c0a4c0f5476c82d9cab600c71fc448
|
data/lib/rails_sso/helpers.rb
CHANGED
@@ -7,7 +7,7 @@ module RailsSso
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def current_user_data
|
10
|
-
@
|
10
|
+
@current_user_data ||= fetch_user_data
|
11
11
|
end
|
12
12
|
|
13
13
|
def user_signed_in?
|
@@ -45,13 +45,13 @@ module RailsSso
|
|
45
45
|
|
46
46
|
private
|
47
47
|
|
48
|
-
def
|
48
|
+
def fetch_user_data
|
49
49
|
return unless session[:access_token]
|
50
50
|
|
51
|
-
RailsSso::FetchUser.new(access_token).call
|
51
|
+
RailsSso::FetchUser.new(access_token).call
|
52
52
|
rescue ::OAuth2::Error
|
53
53
|
refresh_access_token! do
|
54
|
-
RailsSso::FetchUser.new(access_token).call
|
54
|
+
RailsSso::FetchUser.new(access_token).call
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
data/lib/rails_sso/version.rb
CHANGED