omniauth-edumall 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/edumall/user.rb +3 -3
- data/lib/omniauth/edumall/version.rb +1 -1
- data/lib/omniauth/strategies/edumall.rb +4 -4
- 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: 97f0f81fca6f5cb5756a015e27c5d8f496d6bf66
|
4
|
+
data.tar.gz: a678aa6e05ada1f6e1c793dbe12d0020d88abe96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d97f48ce8f77c6b59a5e2f9816d83c38d5fc844cf4f93d9f724cc8dc034fe10ac7728e296edd1a297a90b80aefdceebf0bb47b362ae11811a1c112f42cbe641a
|
7
|
+
data.tar.gz: 64a363e88ff7871bb736b7b11b04d15b35b2a8953348ac080c9d33c0d993c244c305bd9d7621e34c871e5120287893ff0ec6451988ec3bbfe3f83a91d3809efa
|
@@ -2,7 +2,7 @@ module Omniauth
|
|
2
2
|
module Edumall
|
3
3
|
module User
|
4
4
|
extend self
|
5
|
-
EDUMALL_SSO_URL = '
|
5
|
+
EDUMALL_SSO_URL = 'https://accounts.edumall.vn'
|
6
6
|
def user_logout?(cookies)
|
7
7
|
edumall_access_token = cookies[:edumall_access_token]
|
8
8
|
return edumall_access_token.blank?
|
@@ -22,8 +22,8 @@ module Omniauth
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def logout(cookies)
|
25
|
-
cookies.delete :_provider_sso_session, domain: '.
|
26
|
-
cookies.delete :edumall_access_token, domain: '.
|
25
|
+
cookies.delete :_provider_sso_session, domain: '.edumall.vn'
|
26
|
+
cookies.delete :edumall_access_token, domain: '.edumall.vn'
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -3,12 +3,12 @@ module OmniAuth
|
|
3
3
|
module Strategies
|
4
4
|
class Edumall < OmniAuth::Strategies::OAuth2
|
5
5
|
# CUSTOM_PROVIDER_URL = 'https://accounts.edumall.vn'
|
6
|
-
|
6
|
+
EDUMALL_SSO_URL = 'https://accounts.edumall.vn'
|
7
7
|
|
8
8
|
option :client_options, {
|
9
|
-
:site =>
|
10
|
-
:authorize_url => "#{
|
11
|
-
:access_token_url => "#{
|
9
|
+
:site => EDUMALL_SSO_URL,
|
10
|
+
:authorize_url => "#{EDUMALL_SSO_URL}/auth/sso/authorize",
|
11
|
+
:access_token_url => "#{EDUMALL_SSO_URL}/auth/sso/access_token"
|
12
12
|
}
|
13
13
|
|
14
14
|
uid do
|