mumukit-login 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/login/provider/auth0.rb +12 -10
- data/lib/mumukit/login/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: 48edbda68d4cfe47010566b3e964b6ad9eb41f8b
|
4
|
+
data.tar.gz: 322308225595883d0ee68579b44a4aefc0e34207
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f326f6ba810bbe35669cc22452ad83a2aa7d9001ddf9b174c8084ed562c1c99113a4386d0915cccd927f3d573b364b674eec3a5a1a87c022024532897d5846f
|
7
|
+
data.tar.gz: f26ae8bb3e654efc3909b46914ff9ad2bd3b44d4561afc12e34fe7c19c4cc7cc8c6753f9f18dd669e286226a60c549ae014bd5e7c2800c3e7d9d09d5fb9d7dfb
|
@@ -8,19 +8,11 @@ class Mumukit::Login::Provider::Auth0 < Mumukit::Login::Provider::Base
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def request_authentication!(controller, login_settings)
|
11
|
-
|
12
|
-
controller.render_html! <<HTML
|
13
|
-
<script type="text/javascript">
|
14
|
-
new Auth0Lock('#{auth0_config.client_id}', '#{auth0_config.domain}').show(#{settings});
|
15
|
-
</script>
|
16
|
-
HTML
|
11
|
+
controller.render_html! auth0_script_html(controller, login_settings)
|
17
12
|
end
|
18
13
|
|
19
14
|
def header_html(*)
|
20
|
-
|
21
|
-
<script src="https://cdn.auth0.com/js/lock-7.12.min.js"></script>
|
22
|
-
</script>
|
23
|
-
HTML
|
15
|
+
''
|
24
16
|
end
|
25
17
|
|
26
18
|
def footer_html(*)
|
@@ -38,4 +30,14 @@ HTML
|
|
38
30
|
def lock_settings(controller, login_settings, options)
|
39
31
|
login_settings.to_lock_json(controller.url_for(callback_path), options)
|
40
32
|
end
|
33
|
+
|
34
|
+
def auth0_script_html(controller, login_settings)
|
35
|
+
settings = lock_settings(controller, login_settings, {closable: false})
|
36
|
+
<<HTML
|
37
|
+
<script src="https://cdn.auth0.com/js/lock-7.12.min.js"></script>
|
38
|
+
<script type="text/javascript">
|
39
|
+
new Auth0Lock('#{auth0_config.client_id}', '#{auth0_config.domain}').show(#{settings});
|
40
|
+
</script>
|
41
|
+
HTML
|
42
|
+
end
|
41
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|