sso_clyent 0.0.3 → 0.0.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 +8 -8
- data/lib/sso_clyent/engine.rb +8 -6
- data/lib/sso_clyent/version.rb +1 -1
- data/lib/sso_clyent.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWQ2ZjFhYWIxZTA0MTM4ZjI5YjI3ZDdjYTM2NjU0OTEyNDI5MDgxMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWI2ZWYzNmI1YWZhZmE2M2VjYWYzYzUyNmQ0NjI1YTM5ZmU2YTIzOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODg1OGYzN2Y3OGVlZDA2NjZkYjkxMzc1MmY0NTM4Nzc0NTQxNGU2YWZmN2Fj
|
10
|
+
YjU5ZWMwMjcwODhiMDU2MmY3MjQxNjljM2Y2OTMxZDI3NmQ3MWQxMGI1ZmZi
|
11
|
+
Y2JlN2E0Mzk0OTU0Mjg2N2RlNDdmZDY2ZWU3MjBkZDEwMWE4NDE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmQyMGVhYWQwNGQxMGE2OTM0OGIzMzI1N2IxNGY5ZDE4YTE0OWVkMTEzM2Uy
|
14
|
+
ZWNmZTRiNDUxY2JlMDBhYmIzY2I0MjlkNWNjNjc1ZjU3ZGNkYWM2MTU2MzZj
|
15
|
+
NzFmMWUzYjE1MWQ0ZmZhYzkwM2UyZjViODE3ZTY0NGZjN2Y2OGQ=
|
data/lib/sso_clyent/engine.rb
CHANGED
@@ -10,14 +10,16 @@ module SsoClyent
|
|
10
10
|
|
11
11
|
initializer "sso_client.configure" do |app|
|
12
12
|
SsoClyent.configure(app.config.sso_clyent)
|
13
|
-
|
13
|
+
|
14
|
+
if SsoClyent.setup_omniauth
|
15
|
+
require 'sso_clyent/omniauth/strategies/sso'
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
app.config.middleware.use OmniAuth::Builder do
|
18
|
+
provider :sso, SsoClyent.provyder[:app_id], SsoClyent.provyder[:app_secret],
|
19
|
+
:callback_path => "#{SsoClyent.path}/auth/sso/callback",
|
20
|
+
:path_prefix => "#{SsoClyent.path}/auth"
|
21
|
+
end
|
19
22
|
end
|
20
23
|
end
|
21
|
-
|
22
24
|
end
|
23
25
|
end
|
data/lib/sso_clyent/version.rb
CHANGED
data/lib/sso_clyent.rb
CHANGED
@@ -6,6 +6,7 @@ module SsoClyent
|
|
6
6
|
mattr_accessor :after_sign_in_path
|
7
7
|
mattr_accessor :path
|
8
8
|
mattr_accessor :provyder
|
9
|
+
mattr_accessor :setup_omniauth # hack to allow sso_clyent to be incorporated to gems that are used on apps without frontend (ex: in auth_passport_checkpoint for intermediary apis)
|
9
10
|
|
10
11
|
def self.configure(config)
|
11
12
|
@@user_class = config[:user_class]
|
@@ -13,6 +14,7 @@ module SsoClyent
|
|
13
14
|
@@after_sign_in_path = config[:after_sign_in_path] || "/"
|
14
15
|
@@path = config[:path] || "/sso"
|
15
16
|
@@provyder = complete_provyder(config[:provyder])
|
17
|
+
@@setup_omniauth = config[:setup_omniauth] || true
|
16
18
|
end
|
17
19
|
|
18
20
|
def self.user_class
|